April 17, 2013 at 5:05 pm
Comments posted to this topic are about the item PowerShell to search for domain Computer objects
April 30, 2013 at 11:01 pm
Hello Fahim,
How is this different from
Get-ADComputer "RAL" | select Name, DistinguishedName | fl
?
Thank you,
AK
May 1, 2013 at 12:45 pm
aleksbor (4/30/2013)
...How is this different from
Get-ADComputer "RAL" | select Name, DistinguishedName | fl
...
In order to use that Cmdlet, I had to activate the ActiveDirectory feature of windows on the querying server.
Personally I wouldn't want to install the ActiveDirectory feature on my SQL Server, which is where I would be querying from, hence I'd be without the "Get-ADComputer".
I tried to import the module alone, but with no luck, maybe there is a way and I just didn't get it.
This is why I wrote that longer script that used commands already available inside my non-AD server.
May 1, 2013 at 12:47 pm
I see. I usually do this sort of thing from my PC. Also, I beleive in PS V3 modules load automatically...
May 1, 2013 at 12:50 pm
If I could get your command to work, without installing the AD feature, I'd love to get that working. I agree, my work-around is much less efficient.
Please send me instructions or details I'd love to give it a shot, and update my article.
May 1, 2013 at 12:55 pm
Load one of those (depending on OS):
http://www.microsoft.com/en-in/download/details.aspx?id=34595
and run that command I posted earlier.
May 1, 2013 at 2:03 pm
It turns out that I already had the latest version of PowerShell.
However what I needed to do was install a Windows Feature called "RSAT-AD-PowerShell", which then allowed me to run your CMDlet.
Now that I can run the Get-ADComputer cmdlet, how do you wildcard the name ? Or do I have to write that Filter wrapper in Powershell ?
May 1, 2013 at 2:19 pm
You may try something of this sort:
Get-ADComputer -SearchBase "OU=Servers,OU=Computers,DC=you_domain,DC=local" -Filter *
get-help get-adcomputer -examples will show you more examples.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy