PowerShell – How to Restrict Machine Logon by AD username
Aug 03
Active Directory, PowerShell Account Creation, Active Directory, PowerShell No Comments
I was trying to write a script to create AD accounts. I had already figured out how to add the required groups, but I was having a difficult time adding machines to the "Log On To..." / Logon Workstations. Using powershell, I was able to add 3 machines to the list using this code:Set-QADUser userID -objectAttributes @{userWorkstations="Computer1,Computer2,Computer3,etc,etc"}


