Solved

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

Posted on 2014-04-11
4
210 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
Comment Utility
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
Comment Utility
thank you SreRaj, how can I also return results for country not equal "US"
0
 
LVL 12

Expert Comment

by:SreRaj
Comment Utility
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
Comment Utility
perfect. thanks SreRaj!
0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this video we show how to create a Distribution Group 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 Recipients >>…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

771 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

13 Experts available now in Live!

Get 1:1 Help Now