How to find the time of remote machine using PowerShell
Getting local time using powershell is very easy. You can get it with “Get-Date” cmdlet. But how do you get ti
me of remote machine using PowerShell? You have to rely on WMI objects to get this information.
$rtime = Get-WmiObject -Class Win32_OperatingSytem -ComputerName <yourCompName>
write-host $rtime.ConvertToDateTime($rtime.LocalDateTime)
Let me know if you figureout any other easy way.
Categories: PowerShell, Tips
find remote time with powershell
this is a useful tip on powershell…keep up the good job dude..
Thank you