I hope someone can put me in the right direction here, Im playing with some code I found, that copies AD groups from one user to another.
So far I have this
$copyfrom = Read-host "Enter username to copy from: "
$pasteto = Read-host "Enter username to copy to: "
This is working but the issue I have, is that some groups exisit in another domain ie Domain2 and I get an error, how do I get the code to check all our domains, instead of restricting my self to one domain in the -server parameter.
thank you in advance