VMware Cloud Community
vmk2014
Expert
Expert
Jump to solution

Re-booting specific lists of VM from power Cli

Hi All,

we have a task to re-boot specific lists of VM's for re-boot for VMware tools upgrade at power cycle.   E.g. C:\vmliste.txt.

Thanks

vmk

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You could do

$vmNames = Get-Content -Path C:\vmliste.txt

Get-VM -Name $vmNames | Restart-VMGuest -Confirm:$false


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

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

You could do

$vmNames = Get-Content -Path C:\vmliste.txt

Get-VM -Name $vmNames | Restart-VMGuest -Confirm:$false


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

Reply
0 Kudos
vmk2014
Expert
Expert
Jump to solution

Thank you  LucD, will test this tomorrow and update you.

Reply
0 Kudos
vmk2014
Expert
Expert
Jump to solution

Tested and it works. Thank you.

Reply
0 Kudos