Is there a pre-migration trigger that will reboot machines to ensure that all users are completely l (NETIQKB8321)

  • 7708321
  • 02-Feb-2007
  • 16-Aug-2007

Resolution

goal
Is there a pre-migration trigger that will reboot machines to ensure that all users are completely logged off before computer migration?

fact
Domain Migration Administrator 7.x

fix

There is an unsupported workaround that appears to work well with Windows 2000 and later machines.  Unfortunately, NT machines do not have WMI installed by default so this script will not work for them.  You can add the WMI pack to NT machines in preparation for using this script.

Add this script to the Pre Computer VBScript window in the Specify Migration Settings and/or Migrate Computers wizard in DMA:

srcComputer = settings.get("CopiedAccount.SourceSam")
'this line is to remove the trailing dollar sign
srcComputer = Left(srcComputer,Len(srcComputer)-1)
strComputer = srcComputer
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next



note

For more information regarding scripting, please see Chapter 9 of the Domain Migration Administrator User Guide.



note

The body of this script is from the Microsoft Scripting Depot. NetIQ recommends executing the script as a standalone script replacing the following line to test the script outside of DMA prior to including it in the migration:

strComputer = srcComputer

with

strComputer = "testMachineName" 

If any issues are found executing the script outside of DMA, please contact Microsoft for assistance.

Restart a Computer - http://www.microsoft.com/technet/scriptcenter/scripts/desktop/state/dmstvb07.mspx



note
Scripting is NOT Supported by NetIQ for DMA. If you wish to seek NetIQ services for scripting solutions, please contact your Sales Representative about our 'Implementation Services' group.

Additional Information

Formerly known as NETIQKB8321