Ever wondered if a machine was connected to the Internet? Here is how you can find out:
$networkListManager = [Activator]::
CreateInstance([Type]::
GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
$connections = $networkListManager.GetNetworkConnections()
$connections | ForEach-Object {$_.isConnectedToInternet}
$connections | ForEach-Object {$_.isConnectedToInternet}