dsquery/dsget not working in Windows 7
I hope I am posting to the correct thread. Here is the situation. I'm in a Windows 2003 domain where all the servers, even all the domain controllers, are Windows 2003 server. We are slowly implementing Windows 7 Enterprise into our environment, starting in the IT department. I have a dsquery that pipes a dsget to pull the groups a user is a member of in our domain. Here is the query: dsquery user -samid username | dsget user -memberof -expand | dsget group -samid I just substitute the username with the actually user logon name. This query used to work in Windows XP. Now it will not work in Windows 7, even with all the Remote Server Administration Tools installed. When I run the query there is no error or anything just a pause with no output. Would anyone know why this will not work in Windows 7?
May 11th, 2010 5:18pm

To run DSQUERY and DSGET and other you will need to install the Remote Server Administration Tools for Windows 7, you can download the same from here http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=en Hope that helps. -Mukesh
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2010 9:37pm

I did. See my comment: "Now it will not work in Windows 7, even with all the Remote Server Administration Tools installed."
May 11th, 2010 9:47pm

Oh sorry, my bad kind of missed it, try to run just the dsquery user -samid username and see if you are able to get any output. Also are you able to connect to you DC for the windows 7 machine. Try running DSA.msc and see if its able to fetch the default DC for you. -Mukesh
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2010 10:36pm

Thanks. Running dsquery user -samid username gives me a response. So, it's an issue with dsget, maybe? I can connect to the DC. I have that msc open all day long all the time. My Windows 7 machine is a member of the domain.
May 11th, 2010 11:10pm

Anyone else have any thoughts or suggestions? Is this a dsget issue in Windows 7? Does it not work in Windows 7 or is it a security restriction that's not unlocked?
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2010 3:00pm

If no one knows how to correct the dsget query, would anyone know an alternate way (utility) that will let me pull a group list from a user account?
May 14th, 2010 3:32pm

Edward, the following command works for me dsquery user -samid username | dsget user -memberof -expand | dsget group -samid but kind of takes a little time and returns a warning message but shows the results. Would suggest you try running the following dsquery user -samid username | dsget user -memberof -expand first but type it and do not copy paste as when i copied the command from this thread and tried running there was no response and it was kind of stuck forever. -Mukesh
Free Windows Admin Tool Kit Click here and download it now
May 14th, 2010 4:10pm

Thanks. dsquery user -samid username | dsget user -memberof -expand works (after about 45 seconds). But, if I add | dsget group -samid I never get an output, it just sits, stuck. I let it run for more than an hour and nothing happened.
May 19th, 2010 4:40pm

Ok. This is weird. The command did not work the other day, I had those results. However (and I should have done this before posting the last reply), when I just attempted it again, after the reply, it worked. Both times using the same user account. I'm perplexed.
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2010 4:43pm

The problem is the the 'expand'. Looks like some engineer wasn't paying attention to what this is meant to do! Here is the fix: http://support.microsoft.com/kb/980254 Darragh O'Shaughnessy
January 31st, 2011 12:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics