Verifies that a remote PC is in
the target domain specified with the /T switch. Use the optional /SET
switch if you want to set the default domain name value to the target
domain.
NOTE: The use of the /SET switch does not
stop someone from manually selecting another domain. It simply sets the
default.
Exits with error code 0 if all goes well.
IMPORTANT:
Hostname should be a NetBIOS name or an IP address. A FQDN is not
allowed.
Note that in the examples below
'C:\Utils>' is my prompt at the
command line. You don't type this in. :-) and yes someone
asked.
Example #1 -
Check that a PC named PapaRoach is in the Metals domain:
C:\Utils>PreMigMachChk
/m PapaRoach /t Metal + Resolved hostname
to: 192.168.1.69 + NetBIOS name matches. +
Remote PC is in target domain: Metal
C:\Utils>
echo.%errorlevel%
0
Example #2
-
Check to see if a PC named PapaRoach is in the Jazz domain:
C:\Utils>PreMigMachChk
/m PapaRoach /t Jazz + Resolved hostname
to: 192.168.1.69 + NetBIOS name matches. -
Remote PC is in target domain: Metal
C:\Utils>
echo.%errorlevel%
8
Example
#3 -
Like example #1 as it checks that a PC named PapaRoach is in the Metals
domain. This example will set next 'logon to' if needed:
C:\Utils>PreMigMachChk
/m PapaRoach /t Metal /s + Resolved hostname
to: 192.168.1.69 + NetBIOS name matches. +
Remote PC is in target domain: Metal +
DefaultDomainName value is already set to: Metal +
AltDefaultDomainName value is already set to: Metal