server information in powershell

Shell
   $results = Get-WMIObject -query "select StatusCode from
Win32_PingStatus where Address = '$server'"

Source

Also in Shell: