March 3, 2015 at 2:31 pm
Is there anyway,can we find the list of servers by querying at active directory?
Thanks.
March 3, 2015 at 2:47 pm
SQL-DBA-01 (3/3/2015)
Is there anyway,can we find the list of servers by querying at active directory?
I don't think that's a good idea.
The active directory is basically a another database, a repository of AD objects. Unless you or your Domain Admin created an specific OU and put all SQL server boxes there, I don't think how useful a query against it would be. Unless ... your servers have some type of naming convention. But still, not sure how accurate the information will be. I've seen cases of old or dropped servers which computer object is still in AD. It should not, if removed properly, but I have seen those cases before.
Having said that, I think you may probably able to do that via PowerShell? with proper permissions, of course.
March 3, 2015 at 2:49 pm
A little bit of Google magic my friend:
Searching Active Directory with Windows PowerShell
I am sure there is much more out there.
March 3, 2015 at 2:52 pm
i just used this powershell script, that i found after investigating your request
http://blogs.metcorpconsulting.com/tech/?p=343
i had to find and replace wierd left and right double quotes with normal double quotes to make it work, as well as a trailing comma in the first thre elines of the script.
also on my local windows 7 machine, import-module ActiveDirectory failed,as it was not installed.
i had to install the prerequisites from microsoft, then go to add/remobe programs and add features to windows, like this blog says:
i found 56 sql servers isntance svia this method, and some of them i was not aware of at all.
checking to see if they belong under ,my umbrella or not.
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply