Clean-ADGroupMembership

Just seeing how this handles code samples. This is a really simple Powershell script I wrote yesterday to remove every member from an AD group.

Import-Module ActiveDirectory
$ADGroup = read-host "Please Enter the name of the AD Group you would like to Clean"

$Members = Get-ADGroupMember $ADGroup
$Members | Out-File "C:\Temp\clean-ADGroup.txt"

$Members | ForEach-Object {Remove-ADGroupMember $ADGroup $_ -Confirm:$false}

Posted in Scripts | Tagged , , | 5 Comments

Test Post

Please ignore…

Posted in News | Leave a comment