vagrant/plugins/guests/windows/scripts/set_work_network.ps1

7 lines
317 B
PowerShell
Raw Normal View History

2014-03-14 18:23:07 +00:00
# Get network connections
$networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
$connections = $networkListManager.GetNetworkConnections()
# Set network location to Private for all networks
$connections | % {$_.GetNetwork().SetCategory(1)}