VMware Cloud Community
jessem
Enthusiast
Enthusiast

Powercli command to RESET a list of VMs

Hello,


I need to be able to do a hard reset of a list of VMs.  Can anyone help.  Don't need a power off and power on, just a hard reset of VMs.

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Try something like this

Import-Csv vmnames.csv -UseCulture | %{

    (Get-VM -Name $_.VMName).ExtensionData.ResetVM()

}

It assumes a CSV with this layout

"VMName"

"vm1"

"vm2"


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos