Skip to content

Instantly share code, notes, and snippets.

@tomtorggler
Last active March 4, 2016 16:24
Show Gist options
  • Save tomtorggler/c4c2312fa1dbcef5b674 to your computer and use it in GitHub Desktop.
Save tomtorggler/c4c2312fa1dbcef5b674 to your computer and use it in GitHub Desktop.
# Create CIM Sessions to the Nano Servers
$cimSessions = New-CimSession -ComputerName n01,n02,n03,n04
# Get system uptime via CIM to verify the servers
$params = @{
CimSession = $cimSessions;
ClassName = "Win32_OperatingSystem"
}
Get-CimInstance @params | Select-Object PsComputerName,@{Name='UpTime';Expression={$_.LocalDateTime - $_.LastBootUpTime}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment