Up to version 1.3, we used to have one cmdlet for computer accounts (namely Get-QADComputer) – now we have 6:
- Get-QADComputer
- New-QADComputer
- Set-QADComputer
- Enable-QADComputer
- Disable-QADComputer
- Reset-QADComputer
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 guide. Download the new AD cmdlets now and let us know what you think by posting to the AD PowerShell discussion forum!
Subscribe by email


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.