Alright it all appears to work fine and I appreciate the help very much, but would you mind elaborating a bit on how it all works. I have never used try catch throw, and im not all that certain as to what this line of code is doing
“[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()”