JEAZ The bump and grind of daily SysAdmin life

16Nov/113

Set Network Access Permission with PowerShell natively!

On the Active Directory Dial-in tab there is a section titled Network Access Permission which many VPN systems use to control access on a per-account basis.

You can set the value of this property using native PowerShell commands!

Get-ADUser -Filter {samaccountname -eq "AccountNameHere"} -SearchBase "OU=Some OU, DC=domain, DC=local" | Set-ADUser -Clear msNPAllowDialIn

Get-ADUser -Filter {samaccountname -eq "AccountNameHere"} -SearchBase "OU=Some OU, DC=domain, DC=local" | Set-ADUser -Add @{msNPAllowDialIn=$FALSE}

Filed under: Uncategorized 3 Comments