0% found this document useful (0 votes)
3 views

Scripts Get ADUser.ps1

Uploaded by

edwinwps
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Scripts Get ADUser.ps1

Uploaded by

edwinwps
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Get-Command Get-ADUser -Syntax

Get-ADUser
[-AuthType <ADAuthType>]
[-Credential <PSCredential>]
* -Filter <String>
* [-Properties <String[]>]
[-ResultPageSize <Int32>]
[-ResultSetSize <Int32>]
* [-SearchBase <String>]
[-SearchScope <ADSearchScope>]
[-Server <String>]

Get-ADUser -Filter 'surname -like "Gomez*"'


Get-ADUser -Filter {surname -eq "Gomez"}

Get-ADUser jgomez

Get-ADUser -Identity jgomez -Properties * | Format-Table Name, SamAccountName,


UserPrincipalName, Surname, PasswordNeverExpires

Get-ADUser -Filter 'Name -like "Ja*"' -SearchBase


"OU=SISTEMAS,DC=CONTOSO,DC=local" -Properties *

Get-ADUser -Filter 'Name -like "Ja*"' -Properties Name, SamAccountName -Server


UDWS2019.contoso.local

Get-ADUser -Filter * | Export-Csv MisUsuariosAD.csv

Get-ADUser -Filter * -SearchBase "OU=SISTEMAS,DC=CONTOSO,DC=local" -Properties * |


Export-Csv OUSistemas4.csv

Get-ADUser jgomez -Properties whencreated

You might also like