Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Start All Virtual Machines on Remote Servers Running Hyper-V

$
0
0

Summary: See how to start all virtual machines on remote servers running Hyper-V by using Windows PowerShell.

Hey, Scripting Guy! Question How can I start all virtual machines on several remote servers running Hyper-V by using Windows PowerShell?

Hey, Scripting Guy! Answer Use the pattern Get-VM | Start-VM but with the Get-VM cmdlet to specify an array of servers running Hyper-V, as shown here.

get-vm -Computer hyperv3,hyperv2 | start-vm

Use the Get-VM cmdlet to determine the status of the remote virtual machines, as shown here.

PS C:\> get-vm -Computer hyperv3,hyperv2

Name       State   CPUUsage(%) MemoryAssigned(M) Uptime   Status

----       -----   ----------- ----------------- ------   ------

dc3        Running 0           512               00:00:16 Operating normally

dc4        Running 0           512               00:00:15 Operating normally

Ex1        Running 0           4096              00:00:13 Operating normally

 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>