Get-ADUser -Filter "Office -like '*Economy' -and Title -like '*Title'" -SearchBase "OU=Normal Users,OU=User Accounts,DC=your,DC=domain,DC=com" | select Name, SamAccountName It will make it way easier to track down how many students there are in that office. I now want to search in our "Economy" group, but I need to find a specific title and their office. Now, if you want to search for a title, in a specific Active Directory Group based by Office AND Title- you're able to do it like this. Now if you want to export that information, all you need to do is pipe it and place it where you want it to be: Get-ADUser -Filter "Title -like '*Student'" | select Name, SamAccountName | Export-Csv C:\Users\YourAccount\Desktop\Student.csv In that case it will look like this: Get-ADUser -Filter "Title -like '*Student'" | select Name, SamAccountName Lets try to find anyone with "Student" in their title. Lets say you want to find anyone with a specific Title in your active directory. I am chosing their "name" and their "username". In this one, I am chosing to export the information to a csv file and place it on the users desktop. I have been asked about this before, but here's a quick tour of how to pull out Active Directory accounts only by using a simple powershell commando.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |