Powershell Commands

Extract Emails from Group
Get-ADGroup "EXA - Year 13 Pupils" | Get-ADGroupMember -Recursive | Get-ADUser -Properties * |Select SamAccountName,Enabled, GivenName,sn,Mail | E...
Sun, 10 Jan, 2021 at 11:35 PM
Extract Last Login Date
Get-ADUser -Filter * -Properties * | Select-Object name, LastLogonDate, description, mail, enabled | export-csv -path c:\temp\userexport.csv
Sun, 10 Jan, 2021 at 11:34 PM
Extract Usernames from OU
Get-ADUser -SearchBase "OU=ARPA Student Accounts,OU=Atkinson Road User Accounts,OU=User Accounts,OU=Laidlaw Schools Trust,DC=laidlaw,DC=internal" ...
Tue, 12 Jan, 2021 at 12:16 AM