Active Directory Export Computer Groups

posted Oct 8, 2014, 12:32 PM 

Have u ever been in a situation where u needed to export the groups a computer is a member of?  This is a typical request of someone that is performing an image related task and wants to replace all of the applications that were assigned to the computer in CM.  If this fits your needs then DL the following PowerShell script - Get-ADComputerGroup.

Right click the script and choose Run with Powershell

PS1.png

Doing so will briefly launch the PowerShell command line

PS3.png

Pretty simple here....

PS2.png

Path cannot be blank or u will be looped.  No need to worry about quotes for any spaces in your path.

PS4.png

A non-existent path will generate the following message...so be sure it exist and what u typed is correct.

ps6.png

And here is our re-usable output.  In the format of <ComputerName>-ADComputerGroups.log

PS5.png

Wanna import this export, after your imaging process?  Follow this - Active Directory Import User Groups

Previous
Previous

Active Directory Import Computer Groups

Next
Next

Trace32 / CMtrace