So I'm working on a powershell script that can be a discovery method to assist small business, etc.
If I'm on a domain joined PC, I know I can do the following to get a list of the bridgehead servers:
$Sites = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites
($Sites.bridgeheadservers).name
But if I'm on a non-domain joined PC, I'm having a hard time figuring out how I can run this command and be able to specify credentials, forest/domain name, etc. I can't seem to find a way of using Get-ADForest, etc to get this data either.