Solved

need assistance with a quest adcmdlet's script to search for "country" value

Posted on 2014-04-11
4
221 Views
Last Modified: 2014-04-11
hello, can someone provide a way that I can use this script to search for all users in country = US.

here is the script that works fine for searching for a specific city:

Get-QADuser -city "boston" -sizelimit 0 -searchroot "OU=Users,OU=Corp Accounts,DC=mydomain,DC=com" | Add-QADGroupMember bostonDL

Open in new window


I need to search for all users in US and add them to a group.

thx much!
0
Comment
Question by:siber1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
SreRaj earned 500 total points
ID: 39994016
Hi,

Please try the following.

Get-QADUser -IncludedProperties "c" | where {$_.c -eq "US"} | select name,c 

Open in new window

0
 

Author Comment

by:siber1
ID: 39994053
thank you SreRaj, how can I also return results for country not equal "US"
0
 
LVL 12

Expert Comment

by:SreRaj
ID: 39994072
That would be as follows.

Get-QADUser -IncludedProperties "c" | where {$_.c -ne "US"} | select name,c

Open in new window

0
 

Author Closing Comment

by:siber1
ID: 39994141
perfect. thanks SreRaj!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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