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.