Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

remove-adgroupmember

$
0
0

$users=Get-Content"C:\Temp\UserList.txt"
foreach ($userin$users) { remove-adgroupmember-identity'onesign'-member$User-Confirm:$false}

The above code works.  The UserList.txt file has 277 names inside of it and all were removed from the AD group.  My question is why does it take such a long time?   It took over 25 min for this script to run and finish.  I ran it from within the PowerShell ISE tool.

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles