Solved

domainroot, forestroot and specifying a domain

Posted on 2010-11-17
4
654 Views
Last Modified: 2012-05-10
Hi guys hope you can help.
We have several subdomains, and when I run the following:

dsquery * domainroot -filter "(&(objectCategory=Computer))" -attr Name operatingSystem operatingSystemServicePack -limit 0

It targets the current domain I am in.

What Id like to do is to change the domain focus to point to another subdomain and perform the same query against that subdomain.

Any help greatly appreciated.
0
Comment
Question by:Simon336697
[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 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 34160436
Hi, I don't have any subdomains, but can you use:
dsquery * "DC=subdomain,DC=domain,DC=com" -filter "(&(objectCategory=Computer))" -attr Name operatingSystem operatingSystemServicePack -limit 0

Regards,

Rob.
0
 
LVL 1

Author Comment

by:Simon336697
ID: 34199996
Thanks Rob that is awesome
0
 
LVL 1

Author Comment

by:Simon336697
ID: 34200004
Rob can I ask you, are you porting a lot of your scripts over to Powershell, and using Powershell instead of vbs now?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 34201039
Hi.  I'd like to be, but no, I don't know PowerShell and don't have the time to learn it at the moment.  The time spend in writing a PowerShell script would take me about five times as long as writing a VBS at the moment, despite the fact it would be MUCH less code.

One day I hope to find some time to learn PowerShell, but for now, still going with VBS.

Rob.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

This article runs through the process of deploying a single EXE application selectively to a group of user.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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