Free for PREMIUM members
Go Premium for a chance to win a PS4. Enter to Win
adfind -default -f "&(objectcategory=person)(objectclass=user)" samaccountname displayname accountexpires -csv > c:\users.csv
Open in new window
Managing Active Directory does not always have to be complicated. If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why
Get-AdUser -Filter * -Properties * | Select SAMAccountname, DisplayName, AccountExpirationDate | Export-CSV -Path C:\path\to\folder\file.csv
get-aduser your-user-name -properties *
If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.