New cmdlets to manage AD computer accounts

Up to version 1.3, we used to have one cmdlet for computer accounts (namely Get-QADComputer) – now we have 6:

You can kind of guess what they do by their names, but let’s quickly go through them one by one and give a few quick examples.

Retrieves AD computer account objects based on the criteria you specify. E.g. (anyone still running Vista?😉 )

Get-QADComputer spb* -OSName 'Windows Vista*' | Format-Table Name, ManagedBy

Creates new computer account in AD (does not join the actual computer though) and sets the attributes you specify:

New-QADComputer -Name 'LAB-SRV3' -SamAccountName 'LAB-SRV3' -ParentContainer 'CN=Computers,DC=lab,DC=local' -Location 'AMS/HQ/Building A'

Modifies AD computer account properties (can work in bulk when you pipe Get-QADComputer output into this one).

Set-QADComputer 'quest.local/computers/Comp4' -ManagedBy 'QUEST\DSotnikov'

or

Get-QADComputer spb* | Set-QADComputer -Location 'St. Petersburg'

Enable or disable one or multiple computer accounts:

Enable-QADComputer 'CN=LAB-SRV1,CN=Computers,DC=dom,DC=local'

or

Get-QADComputer -SearchRoot 'dom.local/labComputers' | Disable-QADComputer

Reset a computer account in Active Directory. When resetting a computer account, you reset the secure channel between the computer that uses that account to join the domain and a domain controller in the domain.Resetting a computer account breaks that computer’s connection to the domain and requires it to rejoin the domain.

Reset-QADComputer 'CN=LAB-SRV1,CN=Computers,DC=dom,DC=local'

More information can be found in AD cmdlets online reference and PDF guideDownload the new AD cmdlets now and let us know what you think by posting to the AD PowerShell discussion forum!

2 Responses to “New cmdlets to manage AD computer accounts”


  1. 1 Rick November 30, 2009 at 4:13 pm

    Re: disable-qadcomputer – I would like to share that apart from the examples shown from the cmdlet help, you may also choose to use this ,

    gc servers.txt | disable-qadcomputer

    What is still missing ? an ‘enabled’ parameter for get-qadcomputer that allows you find all the enabled computer accounts.


  1. 1 PowerScripting Podcast Trackback on December 7, 2009 at 4:11 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

November 2009
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

%d bloggers like this: