Saturday, 24 July 2021

How to add multiple computer object in a Group using PowerShell

 How to add multiple computer objects in a Group using PowerShell



File Format











$computers = get-content C:\Users\Administrator\Desktop\AdComputer.txt | Get-ADComputer -ErrorAction Ignore
Add-ADGroupMember  -Identity "GroupName" -Members $computers 


No comments:

Post a Comment