View on GitHub


Learn with me as I grow to master PowerShell scripting...

Active Directory Scripts

I will cover the topics.

Active Directory - List Users from a Group

dsquery group -samid "(add group name)" | dsget group -members | dsget user -display -email >>(write results to this file path)(name of file).csv

dsquery group gets the domain services group by the -samid; dsget group gets the -members listed in the group; dsget user gets the users infomartion by therequested tags; »writes the results to a specified file

File System - Search for File Name in a Directory

Get-ChildItem -Path "C:\Users\MyAccount" -Recurse -Include *Search Criteria* | Out-File -FilePath "C:\Users\MyAccount\Desktop\results.csv"