opexxx
10/29/2016 - 12:23 AM

SetNetworkProfile.ps1

$name = 'Dammaschke' # Change
$NetworkCategory = 1 # 0 = Public, 1 = Private (2 = Domain, but not setable)

$profile = Get-CimInstance -Namespace root/StandardCimv2 -ClassName MSFT_NetConnectionProfile|Where-Object Name -EQ $name
$profile.NetworkCategory = $NetworkCategory
Set-CimInstance $profile