Active Directory Power Shell Basic Command
Get All User
Get-ADUser -Filter
*
Get Singal User
Get-ADUser 'Username'
Get Computer Full Details
Get-ADComputer -Filter
*
Get Computer Details for Single Computer
Get-ADComputer -Filter
‘Computer Name’
How to check user enable or disable in
Power Shell Command
Get-ADUser 'UserName'
| select enabled (Show Only Enabled User)
Get-ADUser 'UserName'
| select disabled (Show Only Disabled User)
Get-ADUser -Filter
* | select name,
enabled
Get Ad Group
Get –adgroup
‘ Groupname’
Get –adgroup
-Filter
* | Select Name
Get Group Member
You Can Sort as Required Filed. EX.
Get-ADGroupMember ‘GroupName’ | select name
Get-ADGroupMember
-Identity ‘groupName’ | select
distinguishedname or name
Export Group Member to Csv File
Get-ADGroupMember -Identity ‘GroupName’ | export-csv -path c:\abc.csv -noTypeinformation
How Enable or Disable User Account or
Computer in Power Shell
Disable-ADAccount -Identity "User"
Enable-ADAccount -Identity "User"
Unlock-ADAccount -Identity "User"
Locate disabled computer or user accounts
Search-ADAccount -AccountDisabled
| FT Name,ObjectClass
Add or Remove Group Member in the Group
Remove –ADGroupMember SecurityGroupName –Members Username01
Very nice, plz add user power shell comand.
ReplyDelete