One downside of blogging is that you end up having information scattered through the blog rather than available in a nice well designed document. So I decided to put together a quick summary of the AD cmdlets currently available in v1.0.4.
As a reminder you can download the PowerShell AD cmdlets and full documentation completely free from this site.
So here’s the alphabetical list of the ones we currently have:
Add-QADGroupMember
– add users/groups/computers to a group. Can specify members directly or use pipeline, e.g.:Add-QADGroupMember Beatles -Member jlennon
Get-QADUser Company Beatles | Add-QADGroupMembership Beatles
Add-QADPasswordSettingsObjectAppliesTo
– link Windows 2008 fine-grained policy to a user or group.Connect-QADService
– select a domain or domain controller, or supply alternate credentials.Convert-QADAttributeValue
– Converts a value of AD object attribute to specified .NET type. E.g.:Get-QADuser jsmith | ForEach{ $_.DirectoryEntry.lastLogon}| Convert-QADAttributeValue -to DateTime
Disable-QADUser
– disable user account.Disconnect-QADService
– reset the AD connection established by Connect-QADService.Enable-QADUser
– enable user account.Get-QADComputer
– retrieve AD computer objects.Get-QADGroup
– retrieve AD group objects.Get-QADGroupMember
– get the list of members of a group.Get-QADObject
– get AD objects of any type: OUs, DNS records, etc., browse AD.Get-QADPasswordSettingsObject
– retrieve Windows 2008 fine-grained policies.Get-QADPSSnapinSettings
– get default AD cmdlets settings.Get-QADUser
– get AD user objects.Move-QADObject
– move AD objects between OUs: users, computers, groups, OUs…New-QADGroup
– create AD groups.New-QADObject
– create AD object of arbitrary type.New-QADPasswordSettingsObject
– create new Windows 2008 fine-grained policy.New-QADUser
– create new AD user account.Remove-QADGroupMember
– remove AD user, group, computer from a group. E.g.:Remove-QADGroupMember Beatles -Member tmoore
Get-QADUser Company Beatles | Remove-QADGroupMembership Apple
Remove-QADObject
– delete AD object: user, computer, group, container, anything.Remove-QADPasswordSettingsObjectAppliesTo
– unlink Windows 2008 fine-grained policy to a user or group.Rename-QADObject
– rename AD object: user account, group, container, etc.Set-QADObject
– change properties of any AD objects.Set-QADPSSnapinSettings
– change AD cmdlets defaults (which can be retrieved with Get-QADPSSnapinSettings)Set-QADUser
– change user account properties, reset user password.
Unlock-QADUser
– unlock locked AD user accounts.
Hope this is a helpful summary. Full AD PowerShell documentation can be found here. Also, if you have any questions AD PowerShell discussion forums are the way to go.
Dmitry
Tags: AD cmdlets, PowerShell, Active Directory, AD, reference
Hi,
I have an AD OU with lots of users in it, some of their user homedrive properties are set to M: and others are set to U: . I need to ensure that all users have their home drive attribute set to U: . My question is it possible to set the homedrive attribute for users in an OU all to the same U: drive letter?
(I already have Activeroles ActiveDirectory snapin installed).
Ba,
homeDrive is currently not exposed as a parameter, so you will have to use the -ObjectAttributes parameter instead (see https://dmitrysotnikov.wordpress.com/2007/07/25/set-any-ad-attribute-with-powershell/ for details). For example, to set homeDrive for a particular user you can run:
Set-QADUser testuser -ObjectAttributes @{homeDrive=’U:’}
To do this for all users in an OU I would run:
Get-QADUser -SearchRoot quest.local/Employees -SearchScope OneLevel | Set-QADUser -ObjectAttributes @{homeDrive=’U:’} -Confirm
Hope this helps!
Dmitry
Thanks dmitry, i have been searching around for ages for a solution to this. When you say “not currently exposed as a parameter” is there a specific reason for this?
Just the desire to start shipping something before the AD cmdlets are fully done. We basically had 2 options fully design and engineer the cmdlets and release them at the end of the year, or prioritize and start delivering the functionality in monthly releases.
We picked the second option and I think this was the right way to do. The current version 1.0.4 provides most of the functionality one needs and has workarounds to most of the missing parts (home drives being a good example). We are also getting early feedback from the community (e.g. in this forum: http://powergui.org/forum.jspa?forumID=173) which helps prioritize the dev effort so it works good for both us and the community.
Hello Dmitry,
I just wanted to say thank you for your work on this project. I love the Quest AD cmdlets, they have saved me a bunch of time. I have been amazed by the responsiveness of Quest on these as well. There have been a couple of times already that I have said something on the PowerScripting Podcast about an issue I had using the cmdlets and it was fixed in the next release.
Jonathan
Jonathan,
Whatever makes you reference our work in your podcast more often. 😉
By the way, your podcast keeps getting better and better and gaining more and more tractions. When I first learned you were planning to do this I thought: who would need a podcast about scripting? But now I see that I was absolutely wrong and what you are doing is just great for this community! Just mention PowerGUI and AD cmdlets more often. 😉
Dmitry