
powershell script to list all servers in the forest

I was looking for a way to get a list of all server in our AD forest.
Here?s what I have so far
Get-QADComputer -searchroot 'DC=domain,DC=com' -OSName 'Windows*Server*'| format-Table name, OSName ?auto
Even though domain.com is the root of our AD forest its not searching the entire subtree.
I?ve used many different sites to put this script together so far and I wanted to give them credit.
http://www.computerperformance.co.uk/powershell/powershell_qad_computer.htm ? This is a great site with basic powershell info.
http://www.networkworld.com/community/node/42303 ? examples of how to use the searchbase option.
I?m still searching for how to search all domains in the forest and I?ll update this post when I figure it out.
Related articles by Zemanta
2 thoughts on “powershell script to list all servers in the forest”
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
More Stories
Collection of build numbers
I feel like I'm always looking for an applications history of builds. Sometimes its for windows 10 others for different...
Running office365 on non-persistent VDI desktops
We are working on building our our win10 image with o365 and onedrive. I'm capturing a few links I found...
how to delegate rights to manage printers
Here are some helpful post on setting up delegation on print servers, this includes some powershell scripts to help.
How to configure powershell for o365
Everytime you get a new computer you have to download the latest powershell modules for o365 and it seems like...
online technical training
I've had a few new employees and current employees looking for training on Cisco and Linux training lately. I start...
How to delete files/subfolders in a specific directory at command prompt in Windows
We are in the middle of a data migration project. After we migrate the data to the new file server,...
Have you tried adding the switch -searchScope 'Subtree' ???
Have you tried adding the switch -searchScope 'Subtree' ???