Powershell sctript to get all Active Users and there Important Properties

Powershell sctript to get all Active Users and there Important Properties

get-aduser -ldapfilter “(&(&(objectCategory=user)(userAccountControl=512)))” -Properties * |select DisplayName,UserPrincipalName,Title,SamAccountName,Manager,EmployeeNumber,EmployeeID,City,Country,Deleted,Department,Division,MobilePhone,Office,OfficePhone,Organization,POBox ,PostalCode,State,StreetAddress, EmailAddress,givenname, sn,enabled | export-csv -path c:\users.csv

 

I will update this script to insert this data in Database 

Advertisements