How to check installed patches on VMware VM w/PowerCLi

In light of recent events related to WannaCry ransomware, it becomes very relevant to check if a particular Windows Update (Patch / Hotfix / KB) is installed within VM Guest OS. Test-VMHotfix from my PowerCLi Vi-Module module will quickly and efficiently check all your VMs. The function is very simple to use. Just pipeline VM(s) … Continue reading How to check installed patches on VMware VM w/PowerCLi

How to control maximum number of VMware snapshots w/PowerCLi

Six years ago, the VMware guru William Lam wrote this excellent article. Today we will automate his solution with PowerCLi. Please meet the Set-MaxSnapshotNumber function from my PowerCLi Vi-Module module. The function can do three things: Get maximum allowed snapshot number Set maximum allowed snapshot number Prohibit taking snapshots at all Moreover, it is all … Continue reading How to control maximum number of VMware snapshots w/PowerCLi

How to migrate VMware VM Templates to another Datastore w/PowerCLi

What’s the problem? There is no direct way to migrate VM Templates from Datastore to Datastore (aka Storage VMotion procedure). Please review available actions for both types of virtual objects. VM on the left and Template on the right. Right, Templates have not the «Migrate…» option. There are no PowerCLi cmdlets for this task too. … Continue reading How to migrate VMware VM Templates to another Datastore w/PowerCLi

Compare two or more ESXi hosts w/PowerCLi

The Compare-VMHost function from my PowerCLi Vi-Module allows you to compare two individual ESXi hosts one to another or compare group of hosts, for example, all HA/DRS Cluster members with one reference host. Mandatory parameters The function has two mandatory parameters. -ReferenceVMHost - the reference host that will be compared to the others. -​DifferenceVMHost – … Continue reading Compare two or more ESXi hosts w/PowerCLi

How to configure NTP settings on ESXi hosts w/PowerCLi

PowerCLi includes three functions for configuring «NTP Servers» setting on ESXi hosts: Get-/Add-/Remove-VMHostNtpServer. You can view them using Get-Command cmdlet. In my opinion, it is clearly not enough. Please meet the ​Set-VMHostNtpServer function from my PowerCLi Vi-Module module. Set-VMHostNtpServer This function combines all three previous functions plus a few more to restart the NTP daemon … Continue reading How to configure NTP settings on ESXi hosts w/PowerCLi

How to enable/disable SSH on all ESXi hosts in a cluster w/PowerCLi

This time we will look at just two functions. Enable-VMHostSSH/Disable-VMHostSSH from my PowerCLi Vi-Module. Very often, virtual infrastructure administrators must temporarily enable SSH on the ESXi host(s), for example, to run the esxtop or to clarify the PSOD reasons or to troubleshoot storage system (HBA, Multi pathing, etc.). Through SSH you can even eject the … Continue reading How to enable/disable SSH on all ESXi hosts in a cluster w/PowerCLi