Last active
November 3, 2023 17:19
-
-
Save Rugby-Ball/a4ff85e67aaf0b6bfe2f93ff218e70bf to your computer and use it in GitHub Desktop.
Pull information on an Active Directory user #Utility #Public #Security #Active_Directory #Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ad-user-information.ps1 | |
| # 11/1/2023 | |
| # Requires PowerShell AD Module to be installed. | |
| # This website shows how to do this: https://4sysops.com/wiki/how-to-install-the-powershell-active-directory-module/ | |
| # This will pull information on a user in your Active Directroy. | |
| # if you add | clip for Windows or | pbcopy for MacOS at the end of script, output will go to the clipboard. | |
| Get-ADUser -Filter "Name -like '*chris*'" -Properties * | select @{n="DateRun";e={get-date -f "MM/dd/yyyy hh:mm tt"}},AccountExpirationDate, CanonicalName, CN, Company, createTimeStamp, SamAccountName, DisplayName, EmailAddress,LastLogonDate,logonCount,PasswordExpired,PasswordLastSet,enabled,LockedOut,Manager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment