PostMigMachChk - Post-Migration Machine Check v1.2

Copyright (c) 2003-2007 Gerald W. Gaston

Revision History:
v1.0 - Created with hardcoded values
v1.1 - Added /M and /T switches
v1.2 - Added /S switch


Planned:
v1.3 - Will add additional switches in line with PreMigMachChk (/P, /Q, etc.)
v1.4 - Relax set option (/S) to allow you to set next logon domain to something other than the domain a PC is currently in.

------------------------------------------------------------------------------
Terms of Use:

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED. USE AT YOUR OWN RISK.

YOU MAY NOT DISTRIBUTE POSTMIGMACHCHK WITHOUT THE EXPRESS WRITTEN PERMISSION OF GERALD W. GASTON.

------------------------------------------------------------------------------


PostMigMachChk is a simple console utility that can be used to verify that a remote PC is in the target domain.


PostMigMachChk was created in 2003 due to frustrations encountered when trying to quickly migrate PCs from many NT resource domains to a new AD domain using ADMT v2. PostMigMachChk simply checks a remote PC to verify that it is in the specified domain, and optionally sets the default domain for next logon to the target domain.

Syntax:
------------------------------------------------------------------------------
PostMigMachChk /M {NetBIOS_Name | IP_Address} /T TARGET_DOMAIN [/S]

Verifies that a remote PC is in the target domain specified with the /T switch. Use the /S switch if you want to set the default domain name value to the
target domain. Exits with error code 0 if all goes well.

/M (required): Specify the host to check
/T (required): Specify the TARGET domain we are migrating to
/S (optional): Set default domain to target domain for next logon


NOTE: The use of the /S switch does not stop someone from manually selecting another domain. It simply sets the default. Also, host and domain names should
be NetBIOS names. If a FQDN is passed it will be truncated to the leftmost label up to the first 15 characters.

Exit codes:
------------------------------------------------------------------------------
0   - All checks were successful.

1   - Could not resolve hostname or host offline.

2   - Can not access. Non-NT host or locked down.

4   - NetBIOS name does not match.

8   - Remote PC is NOT in target domain (as specified with the /T switch).

16  - Access denied to remote registry.

32  - Could not verify the current default domain name.

64  - Could not change the default domain name.


Example:

PostMigMachChk.exe /M rmtwrkstation /T ADDOMAIN /s
 + Resolved hostname to: 192.168.2.161
 + Remote PC is in target domain: ADDOMAIN
 + DefaultDomainName value is already set to: ADDOMAIN
 + AltDefaultDomainName value is already set to: ADDOMAIN


More Examples...

See PreMigMachChk for another simple utility to run before migration.


Copyright 2004-2007 Gerald's Tools