PowerCli Snippets

If you want to schedule a PowerCLI/Powershell script (.ps1) using the Windows Task Scheduler, you have to take care of the following requirements: 1. Load the PowerCLI modules Add the following line at the beginning of your .ps1 script to…Read more

I had the requirement to shut down a large number of dedicated virtual machines listed in a .txt file and to turn them on again after a short time. Additionally, I wanted to report the power state of these VMs…Read more

I had the requirement to upgrade the virtual hardware of a large number of VMs to the latest available version. The following PowerCLI script schedules an upgrade of the vHW listed in a .txt file. The upgrade will take place the…Read more