Skip to content

Instantly share code, notes, and snippets.

@manasmbellani
Last active September 12, 2021 13:44
Show Gist options
  • Save manasmbellani/c9e51e44a5ab153b9b7b88058e3242a2 to your computer and use it in GitHub Desktop.
Save manasmbellani/c9e51e44a5ab153b9b7b88058e3242a2 to your computer and use it in GitHub Desktop.
Gets a list of employees with Active EmployeeID and information on them.
# Gets a list of employees with Active EmployeeID
# As at 24/07/2018, Information on Get-ADUser powershell cmdlet available at https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser?view=winserver2012-ps
Get-ADUser -LDAPFilter "(&(EmployeeID=*))" -Properties EmployeeID,EmployeeNumber,Displayname,department, userAccountControl,title | Export-Csv -Path C:\Windows\Temp\out.csv
@manasmbellani
Copy link
Author

Initial draft to get a list of employees with active Employee ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment