I have a list of ad-integrated computers and I need a list of them with their last reboot time. I found some comands like Get-WmiObject -ClassName win32_operatingsystem -ComputerName xxx | select csname, lastbootuptime
but it's not what I need. I would need a script because there are lots of computers.
I have no experience with PowerShell, if someone could help me with some suggestions.
PS C:\Users\XxX> Get-wmiobject win32_operatingsystem -ComputerName LC006909 | select csname, @{label='LastRestart';expression={$_.ConverToDateTime($_.LastBootUpTime)}}
csname LastRestart
------ -----------
LC006909
I get this output ... empty under LastRestart.