DO you have a way of verifying the username and password is correct prior to attempting the join?

I'm doing this:
$objLocator = CreateObject('WbemScripting.SWbemLocator')
$objWBEM=$objLocator.ConnectServer($DC,'root\CIMV2',$DomainBox.text+'\'+$AdminBox.text,$PasswordBox.text)
if not @error

But I have to specify a PC ($DC) to connect to... is there a 'generic method?
_________________________
How to ask questions the smart way <-----------> Before you ask