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

Try like this

 

$stat='sys.osuptime.latest'

$now=Get-Date

 

$vms=Get-VM

Get-Stat-Entity$vms-Stat$stat-Realtime-MaxSamples1|

Select @{N='VM';E={$_.Entity.Name}},

    @{N='LastOSBoot';E={$now.AddSeconds(-$_.Value)}},

    @{N='UptimeDays';E={[math]::Floor($_.Value/(24*60*60))}} |

Export-Csv-Path.\report.csv-NoTypeInformation-UseCulture

 


Viewing all articles
Browse latest Browse all 258290

Trending Articles



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