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

Re: ESXi Host uptime Report for 30 Days with Percentage

$
0
0

Hi LucD, I am using from old thread the below script

 

Get-VMHost|
Sort-Object-PropertyName|
SelectName,
 
@{N="Uptime";E={New-Timespan-Start$_.ExtensionData.Summary.Runtime.BootTime-End (Get-Date) |Select-ExpandPropertyDays}},

  @{N="Date when script was run";E={Get-Date}} |
Export-Csvc:\uptime.csv-NoTypeInformation-UseCulture

 

Getting below output but i need the format i have mentioned before

Name";"Uptime";"Date when script was run"

"host1";"38";"2020-06-14 12:06:09"

"host2";"37";"2020-06-14 12:06:09"

"host3";"38";"2020-06-14 12:06:09"

"host4";"142";"2020-06-14 12:06:09"

 

Thanks

Ranjith


Viewing all articles
Browse latest Browse all 258290

Trending Articles



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