I'm trying to delete the "testserver" AD object via PowerShell. This works if the "testserver" is on the same domain as my laptop where I'm running my script from (dmn1.contoso.local). However, if the "testserver" is on dmn2.contoso.local, this command will search for the AD object on dmn1, not dmn2.
How can modify this command so it will search all domains within the consoto.local forest for this server?
Remove-ADComputer -Identity "testserver"