Created
June 9, 2016 16:08
-
-
Save ciphertxt/043bdaec2754fb4c28d7f47b337a64e9 to your computer and use it in GitHub Desktop.
Returns a listing from Active Directory of users without an office location who are enabled.
This file contains 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
get-aduser -filter {-not(office -like "*") -and (enabled -eq $true)} -properties * | select userprincipalname, samaccountname, surname, givenname, sid, office | export-csv ~\Downloads\ADUsersWithNoOffice.csv -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment