How can I change this setting from a batch file? For any given user, how can I make it so they can only log onto the computer named abc? A vbs or powershell script would be my second choice.
Change list of allowed logon computers from batch file
active-directorybatch-filelogin
Related Topic
- Windows – Change current directory to the batch file directory
- How to execute a batch file each time a user logins
- Windows – Batch script – How to release a locked file for batch ‘copy’
- Batch – File last modification time with seconds
- How to remove directories using wildcards by reading a file using batch
- Powershell – Batch script is not getting executed when called by Start-Process Cmdlet
- Run Batch File from Task Scheduler Without User Login – Windows 7 Guide
- Change directory to “This PC” / “Computer” from .BAT batch file
Best Answer
You need to update the "userWorkstations" AD attribute for the users.
In VBS it would be something Like:
This takes all users in the top level "SCRIPT" OU and modifies the userWorkstation attribute for each. Obviously you can manipulate it as needed.
Also, as Greg pointed out the attribute is not an array and to specify more than one workstation you would use: