Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Forest wide query against all OU's in all Domains

$
0
0

Hello.

In our forest we have 35 domains and OU structure of all domains are identical. Since we need to track down the changes in directory service ,I have a simple PoSH script which queries the number of computers and user objects in specific OU and Out-File them in a text file for monthly and weekly reports.

Now I want to go a little bit further. What I highly want to achieve is to have a simple script that asks you to enter the domain name with a Read-Host Cmdlet and based on the entry of the user, it queries the domain and OU's. It seems to me that variables cannot be used as a domain? 

Any ideas would be appreciated.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>