Questions tagged [dsquery]
42 questions
0
votes
1 answer
Query Windows Active Directory using Python 2.7 from Windows OR Linux device
I have need to write some code that will run on both Windows or Linux which I can use to query a Windows Active directory domain for users or computers. The queries will be relatively small. I'm used to using DSQUERY for such things on Windows but…

stumped221
- 89
- 4
- 18
0
votes
1 answer
Using active directory from command prompt - dsquery user - how to get everyone except x?
Using the example from http://technet.microsoft.com/en-us/library/cc755655(v=ws.10).aspx#BKMK_7
dsquery user OU=Test,DC=Microsoft,DC=Com -name jon
What i want is everyone but jon. The following did not work:
dsquery user…

tomjm
- 328
- 2
- 17
0
votes
2 answers
Powershell / dsquery Pull list of users in an array of groups make an array with the unique users
I have been tasked with making sure all admins have the correct permissions. We have a few admin groups so what I though I would do is use powershell and dsquery to pull all the users from these groups and put them in to an array. The user might be…

Tombomb
- 17
- 5
0
votes
1 answer
List of active directory group members that are not disabled
I've been trying to locate / write a script that displays all NON disabled accounts in an active directory group.
The closest I've come to a working script displays all members of a group but it also shows the disabled users.
Here's the non-filtered…

Rob
- 211
- 2
- 4
- 18
0
votes
1 answer
Modify a text file using a batch file
I have the following in myFile.txt:
samid
xxuserMike
xxuserDave
xxuserSue
dsget succeeded
I'd like to use a batch commands to make it:
"xxuserMike"
"xxuserDave"
"xxuserSue"
Side note, the original file is created using dsquery / dsget to…
user3356995
0
votes
0 answers
Using dsquery in Powershell clear cache?
I am using this command @(dsquery computer -name $server).count} in a powershell script to do some pre-checks and also to check if removal a computer account was successfull or not.
Even if set the value to 0 and I perform the query again in the…

user2587683
- 191
- 2
- 6
0
votes
1 answer
Need to build list of group members
I have a server with its own local Groups. These groups hold AD users. I use them to apply permissions for the user in a web app. I need to generate a list of all the users in the group.
This is the script I'm trying to use:
dsquery group -samid…

StandardBearer
- 55
- 6
0
votes
1 answer
Verify user in AD, if user not found, ask again
I am trying find a specific user in AD using samaccountname if i type in an incorrect account i want the question to repeat until it finds the user, tells me the username and pauses until a key is pressed. Here is what i have so far and its not…

user2402045
- 71
- 1
- 3
- 13
0
votes
1 answer
Formatting the output of repadmin - powershell
I'm creating a script that tells me the creation / modification date and other pieces of info of AD objects to determine upgrade status of the machines in large domains. I have no problem accomplishing this in a well formatted and easy to read…

smierdziel
- 133
- 2
- 3
- 9
0
votes
1 answer
trying to copy security groups to a user using dsmod group utility in AD
I am trying to create a batch file that asks to enter source samid and destination samid. Then using dsquery and dsget find out what security groups source samid is assigned to and assign destination samid to those security groups using…

newbie
- 11
- 1
- 4
-2
votes
1 answer
LDAPS - Recommendations for a read-only troubleshooting utility?
I'm trying to find a good tool for a customer service team to better qualify LDAPS issues. When a customer enters their LDAPS details into our client and it errors, I'd like the customer service team to be able to qualify the issue by reproducing…

infoseek
- 1
- 1
-5
votes
2 answers
How to display list Active Directory users that arent in specific AD Groups
I have a requirment to create a report/text file that displays the users that arent in specific AD groups. I know displaying users that are in specific AD groups is easy enough with Powershell.
Surely its possible to display the users that ARENT in…

John
- 1