Proposed Answer Sysprep error : Computer is a member of domain

  • Tuesday, October 02, 2012 10:09 AM
     
     

    Hello,

    when doing a sysprep and capture i receive the following error:

    I am logged on as a local admin but the computer is member of a domain.

    Are the possiblities to sysprep and capture the computer while is it member of the domain (by local-user or someting)?

    Thx

All Replies

  • Tuesday, October 02, 2012 1:42 PM
     
     Proposed Answer
    It needs to be workgroup, not domain when capturing. During deploy you can select to have it join your domain.
    • Proposed As Answer by Shrek46 Tuesday, October 02, 2012 5:33 PM
    •  
  • Wednesday, October 03, 2012 7:05 AM
     
     

    So there arent`t possibilities to capture and sysprep without disjoining domain? also not logging in as local admin?

    What is the best way to sysprep and capture? From windows or from the task sequence?

    Thx

  • Wednesday, October 03, 2012 3:16 PM
     
     Proposed Answer Has Code

    There is an option to sysprep the computer while currently being domain joined. However we don't really recommend creating a reference Windows image that is/was domain joined as some settings are persistent and will remain after disjoining. Eventhough this is a "solution" to your problem, it's really not a best practice.

    In order to disable the domain check for running sysprep, edit the file [deploymentshare\scripts\ltisysprep.wsf]

    Go to line 70, you will see a comment section stating that it's now going to check whether or not the OS is in a domain.

    You can safely remove lines 69 to 81, which would be the following lines of code.

    		'//----------------------------------------------------------------------------
    		'//  Validate that we're not in a domain
    		'//----------------------------------------------------------------------------
    
    		For each oComputer in objWMI.InstancesOf("Win32_ComputerSystem")
    			Select Case oComputer.DomainRole
    				Case 1, 3, 4, 5
    					oLogging.ReportFailure "Computer is a member of a domain, should be in a workgroup when sysprepping.", 7002
    					Exit function
    				Case else
    					oLogging.CreateEntry "Computer is not a member of a domain.", LogTypeInfo
    			End Select				
    		Next

    Kind regards,

    Stephan Schwarz


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
    How to configure Windows RE/OEM Recovery Partition with MDT

    • Proposed As Answer by Vik Singh Wednesday, October 03, 2012 3:28 PM
    •