Skip to content

Instantly share code, notes, and snippets.

@itpropro
Created March 6, 2016 13:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save itpropro/669aa6c0018a1f5c5ce1 to your computer and use it in GitHub Desktop.
Save itpropro/669aa6c0018a1f5c5ce1 to your computer and use it in GitHub Desktop.
$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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment