Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229504

Re: Need script for VM uptime (for 30days )..hepl me its very urgent

$
0
0

Can you attach that MyScript.ps1 ?

 

Do you call the Get-VMUptime function at the end of the .ps1 file ?

The file content should look something like this

 

function Get-VMUptime {

....

}

 

$vm = Get-VM -Name MyVM

$start = (Get-Date).AddDays(-30)

Get-VMUptime -VM  $vm -Start $start

Have a look at the samples at the end of my post.


Viewing all articles
Browse latest Browse all 229504

Trending Articles