|
|
|
# Overview
|
|
|
|
|
|
|
|
The script generally accepts a vCenter hostname and list of servers on which to correct the CPU settings. Not providing a list of servers to correct will run a read-only pass on the vCenter and output all servers on which the script could/would alter the settings.
|
|
|
|
|
|
|
|
# Command-line Options
|
|
|
|
|
|
|
|
Only -VIServer is required. -Credentials is optional, as user input for credentials will be requested if it is not provided. All other options are optional.
|
|
|
|
|
|
|
|
| Option | Type | Description |
|
|
|
|
|--------|------|-------------|
|
|
|
|
| \-VIServer | string | The hostname of the vCenter on which to evaluate CPU settings. |
|
|
|
|
| \-Credentials | PSCredential | Credentials to connect to the vCenter. |
|
|
|
|
| \-Run | switch | Perform work on the servers that need settings changes. When not specified, the script runs in read-only mode. |
|
|
|
|
| \-VMCOLogic | switch | Use the NUMA node identification logic and math from the VMware Fling "Virtual Machine Compute Optimizer" script. |
|
|
|
|
| \-Specific | string\[\] | An array of servers to examine/update. Mutually exclusive with -SpecificFile. |
|
|
|
|
| \-SpecificFile | string | A path to a file of servers to examine/update, one server per line. Mutually exclusive with -Specific. |
|
|
|
|
| \-NumConcurrent | int | The number of VMs to update at once. Only applicable if -Run is specified. |
|
|
|
|
| \-CSVOut | string | The path to a file which will be populated with the output of the script (CPU settings, current and suggested). |
|
|
|
|
| \-OnlyPoweredOff | switch | Only examine and/or update VMs that are powered off. Ignore all powered on VMs. |
|
|
|
|
| \-AlwaysPowerOn | switch | Always power on VMs that have had work performed on them, even if they were originally powered off. |
|
|
|
|
| \-NoConfirmation | switch | Do not require user input before performing changes to VMs. Useful for automation of the script. |
|
|
|
|
|
|
|
|
# Examples
|
|
|
|
|
|
|
|
Examine and produce suggested changes for all VMs in a vCenter:
|
|
|
|
|
|
|
|
`.\FixBadSockets.ps1 -VIServer vcenter.partners.org`
|
|
|
|
|
|
|
|
Examine and apply changes to three servers using VMCO rules:
|
|
|
|
|
|
|
|
`.\FixBadSockets.ps1 -VIServer vcenter.partners.org -VMCOLogic -Specific server1,serverB,serverIII`
|
|
|
|
|
|
|
|
Examine powered-off VMs and produce a CSV report of suggestions:
|
|
|
|
|
|
|
|
`.\FixBadSockets.ps1 -VIServer vcenter.partners.org -OnlyPoweredOff -CSVOut .\output.csv` |
|
|
|
\ No newline at end of file |