Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

get ADuser by office

Posted on 2016-08-15
2
Medium Priority
?
133 Views
Last Modified: 2016-08-15
How could search the ad for a user by the office field in the ad profile?
0
Comment
Question by:Roccat
2 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 41756291
Replace the "*" with whatever you want to look for; "*" is a wildcard for zero or more characters, "?" for exactly one character.
Get-ADUser -Filter "physicalDeliveryOfficeName -like '*'" -Property physicalDeliveryOfficeName

Open in new window

0
 

Author Closing Comment

by:Roccat
ID: 41756299
Thank You!!
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question