Sunday, 4 April 2021

How to remove Active Directory Multiple User from the Group using PowerShell.

How to remove Active Directory Multiple User from the Group using PowerShell.



Csv file format










Import-Csv -Path "C:\Temp\Users.csv" | ForEach-Object {Remove-ADGroupMember -Identity "GROUPNAME" -Members $_.'SamAccountName' -Confirm:$false

No comments:

Post a Comment