Solved

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

Posted on 2014-04-11
4
213 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
  • 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

Do email signature updates give you a headache?

Are you constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now