Remove Computer From AD Group
Description:
Removes specified computer from specified AD group. This is a simple example, but can easily be modified for usage in a loop with a provided list of PCs (see HERE for that).
Language:
PowerShell
Usage Type:
Standalone
Script Source:
################################################### # Remove Computer from AD Group # Script by Sean Huggans # Date: 2016.12.12 ################################################### $ADGroup = "GROUP43" $ADComputer = "COMPUTER03" Remove-ADGroupMember -Identity $(Get-ADGroup $ADGroup).DistinguishedName -Member $(Get-ADComputer $ADComputer).DistinguishedName -Confirm:$false
Note: that all applications posted here are posted for use, both commercial and non-commercial, free of charge, and as such are provided as-is, without warranty of any kind whatsoever. visuaFUSION, FMSCUG or any other program listed here's author are not responsible for any damages or shortcomings that result from usage of any of these applications.