Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/8972413 to your computer and use it in GitHub Desktop.
Save normansolutions/8972413 to your computer and use it in GitHub Desktop.
For use on blog post: http://www.normansolutions.co.uk/post/PowerShell to secure AD users RDP access
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
Get-QADUser * -OrganizationalUnit "ou=Your Sub-OU,ou=Your OU,dc=Your LDAP,dc=Your LDAP" |
?{$_.TsAllowLogon -ne $true} |
Set-QADUser -TsAllowLogon $true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment