https://github.com/unkn0wnvariable/powershell-vmwareadmin
My attempts at making life with VMware that little bit easier.
https://github.com/unkn0wnvariable/powershell-vmwareadmin
powershell powershell-adminscripts powershell-script powershell-scripts script scripts vmware vmware-esxi vmware-vsphere
Last synced: 25 days ago
JSON representation
My attempts at making life with VMware that little bit easier.
- Host: GitHub
- URL: https://github.com/unkn0wnvariable/powershell-vmwareadmin
- Owner: unkn0wnvariable
- License: gpl-3.0
- Created: 2018-08-10T17:35:28.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T18:53:30.000Z (over 2 years ago)
- Last Synced: 2025-07-12T10:34:26.489Z (9 months ago)
- Topics: powershell, powershell-adminscripts, powershell-script, powershell-scripts, script, scripts, vmware, vmware-esxi, vmware-vsphere
- Language: PowerShell
- Homepage:
- Size: 78.1 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VMware PowerShell
**My attempts at making life with VMware that little bit easier.**
## Prerequisites
These scripts all require PowerCLI to be installed.
PowerCLI version 10 is installed using the following command in PowerShell:
`Install-Module -Name VMware.PowerCLI -Scope CurrentUser`
If you have a previous version installed, uninstall it before installing v10. You also may need -AllowClobber to overwrite existing modules.
E.g.:
`Install-Module -Name VMware.PowerCLI -Scope CurrentUser -AllowClobber`
## PowerCLI v10 Changes
### Module vs Initialization
With the release of PowerCLI v10 we are now able to import the required modules in the normal PowerShell way, e.g. `Import-Module -Name VMware.PowerCLI`, this means that the old PowerCLI initialization script no longer works and I have updated my scripts accordingly. Going forward I cannot guarantee or verify that these scripts will work in older versions of PowerCLI, even if the environment initialisation script is used first, so please use v10 or higher.
In my scripts I'm actually using `Import-Module -Name VMware.PowerCLI -Force` to make sure the correct module is loaded.
### Invalid Certificates
PowerCLI 10 changes the default behaviour for untrusted certificates from warn to fail, this means you won't be able to connect if using self-signed certificates.
This behaviour can be reverted back temporarily using:
`Set-PowerCLIConfiguration -InvalidCertificateAction Warn -Scope Session -Confirm:$false`
Or permanently using:
`Set-PowerCLIConfiguration -InvalidCertificateAction Warn -Confirm:$false`
Personally I prefer setting it to prompt, then I can make my choice on a per-server basis.
E.g.:
`Set-PowerCLIConfiguration -InvalidCertificateAction Prompt -Confirm:$false`
## Disclaimer
All scripts are provided as is without warranty of any kind, use them at your own risk.