The script removes the computer it is being executed from one or more AD groups. Powershell.exe -NoProfile -ExecutionPolicy Bypass –File AddToGroups.Ps1 “group1”:”group2” The account used to run the step must have permissions in AD to execute the command. “:” is the separator and if there is a space in the group name use “” as well. The script adds the computer it is being executed on to one or more AD Groups. Script to set the AD computer description: Īll scripts have to run in full OS and not in WinPE.Script to add/remove Computer from AD group:.Here are three of the scripts in Powershell instead, AddtoADGroup, RemoveFromADGroup And SetADdescription. I mostly use webservices to manage tasks like this now, but they are still being used out there so it is time to update them to Powershell! I checked the statistics for my blog and comments as well, the “old” vbscripts I wrote to Add a Computer to an AD group and Set AD Computer Description as still being downloaded, used and commented on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |