{"id":22,"date":"2011-11-16T16:18:23","date_gmt":"2011-11-17T00:18:23","guid":{"rendered":"http:\/\/www.jeaz.org\/?p=22"},"modified":"2014-06-30T16:42:07","modified_gmt":"2014-07-01T00:42:07","slug":"set-network-access-permission-with-powershell-natively","status":"publish","type":"post","link":"https:\/\/www.jeaz.org\/?p=22","title":{"rendered":"Set Network Access Permission with PowerShell natively!"},"content":{"rendered":"<p>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.<\/p>\n<p>You can set the value of this property using <strong>native<\/strong> PowerShell commands!<\/p>\n<blockquote><p>Get-ADUser -Filter {samaccountname -eq \"AccountNameHere\"} -SearchBase \"OU=Some OU, DC=domain, DC=local\" | Set-ADUser -Clear msNPAllowDialIn<br \/>\n<br \/>\nGet-ADUser -Filter {samaccountname -eq \"AccountNameHere\"} -SearchBase \"OU=Some OU, DC=domain, DC=local\" | Set-ADUser -Add @{msNPAllowDialIn=$FALSE}<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;AccountNameHere&#8221;} -SearchBase &#8220;OU=Some OU, DC=domain, DC=local&#8221; | Set-ADUser -Clear msNPAllowDialIn Get-ADUser -Filter {samaccountname [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.jeaz.org\/index.php?rest_route=\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jeaz.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jeaz.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jeaz.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jeaz.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22"}],"version-history":[{"count":0,"href":"https:\/\/www.jeaz.org\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jeaz.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jeaz.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jeaz.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}