giovedì 13 gennaio 2022

POWERSHELL - Elenco delle utenze su Active Directory

Questo comando powershell permette di recuperare l'elenco delle utenze da Active Directory:

 Get-ADUser -Filter * -SearchBase "DC=dominio,DC=it" | Select UserPrincipalName,DistinguishedName,AccountExpirationDate,Enabled,Created,LastLogonDate,Name,Surname | Export-CSV "C:\UserList.csv" -Encoding UTF8

Nessun commento:

Posta un commento