Branch: master
Find file History
Latest commit 0ff2f7e Jan 27, 2019

powercliVMware VI Automation Module

Requirements: PowerShell 5 or above. To check, type the following command: $PSVersionTable.PSVersion.Major.

To install this module, drop the entire 'Vi-Module' folder into one of your module directories.

The default PowerShell module paths are listed in the $env:PSModulePath environment variable.

To make it look better, split the paths in this manner: $env:PSModulePath -split ';'

The default per-user module path is: "$env:HOMEDRIVE$env:HOMEPATH\Documents\WindowsPowerShell\Modules".

The default computer-level module path is: "$env:windir\System32\WindowsPowerShell\v1.0\Modules".

To use the module, type following command: Import-Module Vi-Module -Force -Verbose.

To see the commands imported, type Get-Command -Module Vi-Module.

For help on each individual cmdlet or function, run Get-Help CmdletName -Full [-Online][-Examples].

No Cmdlet Description
1 Get-RDM Get all VM with their RDM (Raw Device Mappings) disks
2 Convert-VmdkThin2EZThick Inflate thin virtual disks
3 Find-VcVm Search VCenter VM throw direct connection to group of ESXi hosts. Thanks to for the article
4 Set-PowerCLiTitle Write connected VI servers info to PowerCLi window title bar
5 Get-VMHostFirmwareVersion Get a Firmware version and release date of your ESXi hosts
6 Compare-VMHostSoftwareVib Deprecated. Use Compare-VMHost -Compare VIB instead
7 Get-VMHostBirthday Get ESXi hosts' installation date. Thanks to Magnus Andersson for his idea
8 Enable-VMHostSSH/Disable-VMHostSSH Enable/Disable SSH on all ESXi hosts in a cluster
9 Set-VMHostNtpServer Set NTP Servers setting on ESXi hosts
10 Get-Version Get VMware Virtual Infrastructure objects' version info: VM, ESXi Hosts, VDSwitches, Datastores, VCenters, PowerCLi, License Keys
11 Compare-VMHost Compare two or more ESXi hosts with PowerCLi
12 Move-Template2Datastore Invoke Storage VMotion task for VM Template(s)
13 Connect-VMHostPutty Connect to ESXi host(s) by putty SSH client with no password!
14 Set-MaxSnapshotNumber Set maximum allowed VM snapshot number
15 Get-VMHostGPU Get ESXi host(s) GPU info
16 Test-VMHotfix Test VM for installed Hotfix(es)
17 Test-VMPing Test VM accessibility
18 Search-Datastore Browse/Search VMware Datastores
19 Get-VMHostPnic/Get-VMHostHba Get ESXi hosts Peripheral devices
20 Set-SdrsCluster/Get-SdrsCluster Configure Storage DRS clusters
21 Add-SdrsAntiAffinityRule/Get-SdrsAntiAffinityRule/Remove-SdrsAntiAffinityRule Create and delete SDRS Anti-Affinity Rules
22 Invoke-SdrsRecommendation Run Storage DRS recommendations
23 Set-SdrsAntiAffinityRule Configure SDRS Anti-Affinity Rules
24 Convert-VI2PSCredential Securely save and retrieve credentials
25 Get-VMGuestPartition/Expand-VMGuestPartition Extend VM Guest Partition
26 Get-ViSession/Disconnect-ViSession List and disconnect VCenter sessions
27 New-SmartSnapshot Intellectual VMware snapshots
28 Get-VMHostCDP Leverage Cisco Discovery Protocol
29 Get-VMLoggedOnUser Get VM Logged On users