Back to All Commands
Most Viewed
Favorites
Recently Viewed
windows_ad Commands
User Management
Get-ADUser
Gets one or more Active Directory users.
Get-ADUser
Examples:
Get a specific user by their SAM account nameGet-ADUser -Identity 'jdoe'
Get-ADUser -Filter * -SearchBase 'OU=Finance,DC=example,DC=com'
Get-ADUser -Filter 'Enabled -eq $true' -Properties EmailAddress | Select-Object Name, EmailAddress
Set-ADUser
Modifies an Active Directory user.
Set-ADUser
Examples:
Set the description for a userSet-ADUser -Identity 'jsmith' -Description 'Accountant'
Set-ADUser -Identity 'jdoe' -Enabled $false
Set-ADUser -Identity 'jdoe' -Clear 'manager'
New-ADUser
Creates a new Active Directory user.
New-ADUser
Examples:
Create a new user with a password promptNew-ADUser -Name 'Jane Doe' -SamAccountName 'jdoe' -AccountPassword (Read-Host -AsSecureString 'Enter password:') -Path 'OU=Users,DC=example,DC=com' -Enabled $true
Remove-ADUser
Removes an Active Directory user.
Remove-ADUser
Examples:
Remove a user with confirmationRemove-ADUser -Identity 'jdoe'
Computer Management
Get-ADComputer
Gets one or more Active Directory computers.
Get-ADComputer
Examples:
Get a specific computer objectGet-ADComputer -Identity 'SERVER01'
Get-ADComputer -Filter 'Name -like "*server*"'
Group Management
Get-ADGroup
Gets one or more Active Directory groups.
Get-ADGroup
Examples:
Get a specific groupGet-ADGroup -Identity 'Domain Admins'
Get-ADGroup -Filter 'GroupCategory -eq "Security"'
Get-ADGroupMember
Gets the members of an Active Directory group.
Get-ADGroupMember
Examples:
Get members of the 'Domain Admins' groupGet-ADGroupMember -Identity 'Domain Admins'
Get-ADGroupMember -Identity 'All-Staff' -Recursive
Add-ADGroupMember
Adds one or more members to an Active Directory group.
Add-ADGroupMember
Examples:
Add a user to a groupAdd-ADGroupMember -Identity 'Finance Users' -Members 'jdoe'
Add-ADGroupMember -Identity 'Marketing' -Members 'jsmith','bsmith'
Ou Management
Get-ADOrganizationalUnit
Gets one or more Active Directory organizational units.
Get-ADOrganizationalUnit
Examples:
Get all OUs in a domainGet-ADOrganizationalUnit -Filter *