if([environment]::OSVersion.version.Major -lt 6) { return }                      # not if os older than vista
if(1,3,4,5 -contains (Get-WmiObject win32_computersystem).DomainRole) { return } # not if domain joined
$networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
$connections = $networkListManager.GetNetworkConnections()
$connections | % {$_.GetNetwork().SetCategory(1)}
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
sleep 5
