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

Re: powercli script to get last boottime of guest OS

$
0
0

hi LucD

since VMtools Is outdated on some VMs getting warnings and no output. can we modify the below to get boottime instead of uptime ?

 

$stat = 'sys.osuptime.latest'

$entity = Get-VM (get-content servers.txt)

Get-Stat -Entity $entity -Stat $stat -Realtime -MaxSamples 1 -ErrorAction SilentlyContinue | Select @{N='VM';E={$_.Entity.Name}}, @{N='Uptime (d.hh:mm:ss)';E={[timespan]::FromSeconds($_.value)}}

 

this I got from you and works perfectly in getting uptime.


Viewing all articles
Browse latest Browse all 258290

Trending Articles



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