Carl Webster
asked on
List all servers in Active Directory
Need a script to list all servers in Active Directory. From Windows 2000 Server all the way up to and including Windows Server 2008 R2. Need to make sure all Editions are included. e.g. Advanced, Standard, Enterprise, Datacenter and 32-bit and 64-bit versions.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That should be
get-qadcomputer -sizelimit 0 | where{$_.operatingsystem -match "Server"} | select name
get-qadcomputer -sizelimit 0 | where{$_.operatingsystem -match "Server"} | select name
"My problem is I do not know if PS is installed on any server or if I will be allowed to install PS."
Check if you have a Windows 2008 R2 Domain Controller. If you do, you have the MS AD Powershell Console already.
Check if you have a Windows 2008 R2 Domain Controller. If you do, you have the MS AD Powershell Console already.
ASKER
KenMcF, where do I get and how to I install the Quest AD cmdlets?
I have two other questions I posted this morning. This file of server names will be used by another script to list all local groups on each server and the members of each group including nested groups.
I have two other questions I posted this morning. This file of server names will be used by another script to list all local groups on each server and the members of each group including nested groups.
ASKER
acbrown2010, when I test this on my lab 2008 R2 DC, I get an error saying the term get-adcomputer is not recognized yada yada yada.
ASKER
acbrown2010, sorry didn't realize I had to do this:
When the Active Directory module is installed, to start it click Start, point to Administrative Tools, and then click Active Directory PowerShell
When the Active Directory module is installed, to start it click Start, point to Administrative Tools, and then click Active Directory PowerShell
ASKER
I wound up just using ADFind to do this since the AD and all DCs were 2000.
ASKER
I just emailed the customer to find out. It would be nice if PS is installed or they give me permission to install it.
All I need is the "cn" attribute (according to the test dsquery I ran) which should be the server's hostname.