none
What is the difference between an OSD task sequence and a Windows Task Sequence?

    Question

  • I am trying to perform an Exchange 2007 schema update in my test lab and I am having mixed results. There is clearly a difference between what the task sequence does when run as a direct advertisement and as part of an OSD deployment. Here are the results, can anyone help me?

    1. I create a run command line action called Prepare the Schema with the action "setup.com /PrepareSchema", using a package that has the Exchange 2007 source and configured to run as the domain Administrator account.

    2. This action is added to a task sequence which is advertised to a domain member which in the domain, waiting for an advertisement.

    3. The same action is copied to an OSD based deployment which build the server, configures the domain with dcpromo, installs Powershell and any other goodies then executes the action.

    The results...

    The task sequence targeted at the Windows member server performs the schema update as expected. The log file is here...

    Set command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    Start executing the command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    !--------------------------------------------------------------------------------------------!
    Expand a string: WinPEandFullOS
    Executing command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    =======================[ smsswd.exe ] =======================
    PackageID = 'DEV000FE'
    BaseVar   = '', ContinueOnError=''
    SwdAction = '0001'
    Getting linked token
    failed to get the token information
    Run command line under a user account
    Found the location for the package _SMSTSDEV000FE. The location is on
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE\
    nPos != CCM::Utility::String::npos, HRESULT=80004005 (e:\nts_sms_fre\sms\framework\tscore\resolvesource.cpp,258)
    Creating a connection to
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE\ with default account
    Connection request for "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    No credentials available for connecting to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE". See whether the share has already been connected.
    Connecting to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    Successfully connected to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    Resolved source to '\\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE'
    Command line for extension .com is "%1" %*
    Set command line: Run command line
    Working dir '\\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE'
    Executing command line: Run command line
    Create a process under given user token
    InstallSoftware
    Welcome to Microsoft Exchange Server 2007 Unattended Setup
    InstallSoftware
    Preparing Exchange Setup
    InstallSoftware
        Copying Setup Files              ......................... COMPLETED
    InstallSoftware
    No server roles will be installed
    InstallSoftware
    Performing Microsoft Exchange Server Prerequisite Check
    InstallSoftware
     Organization Checks ... COMPLETED
    InstallSoftware
    Configuring Microsoft Exchange Server
    InstallSoftware
     Extending Active Directory schema ... COMPLETED
    InstallSoftware
    The Microsoft Exchange Server setup operation completed successfully.
    Process completed with exit code 0
    Command line returned 0

    The action advertised during the OSD session does not error but does not perform the action either. The log file is here....

    Set command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    Start executing the command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    !--------------------------------------------------------------------------------------------!
    Expand a string: WinPEandFullOS
    Executing command line: smsswd.exe /run:DEV000FE setup.com /PrepareSchema
    =======================[ smsswd.exe ] =======================
    PackageID = 'DEV000FE'
    BaseVar   = '', ContinueOnError=''
    SwdAction = '0001'
    Getting linked token
    failed to get the token information
    Get RunAs private desktop SMSTS-209625\SMSTSDesktop
    Run command line under a user account
    Found the location for the package _SMSTSDEV000FE. The location is on
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE\
    nPos != CCM::Utility::String::npos, HRESULT=80004005 (e:\nts_sms_fre\sms\framework\tscore\resolvesource.cpp,258)
    Creating a connection to
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE\ with default account
    Connection request for "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    No credentials available for connecting to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE". See whether the share has already been connected.
    Connecting to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    Successfully connected to "
    \\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE"
    Resolved source to '\\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE'
    Command line for extension .com is "%1" %*
    Set command line: Run command line
    Working dir '\\GSG-SCCM01.DEV.DOM\SMSPKGD$\DEV000FE'
    Executing command line: Run command line
    Create a process under given user token
    Process completed with exit code 0
    Command line returned 0

    The only difference that immediately stands out is the line Get RunAs private desktop SMSTS-209625\SMSTSDesktop which does not appear in the working action.

    Can someone explain why the two task sequence environments work differently? Thanks in advance.
    Wednesday, May 06, 2009 4:01 AM

All replies

  • So, my first question is why would you want to do something like this via a task sequence.

    As for why it doens't work, I think that the setup program for Exchange 07 requires the .Net Framework 2.0 which is not part of Widows PE. That's just a WAG though because I don't know what your TS actually looks like.
    Jason | http://myitforum.com/cs2/blogs/jsandys
    Wednesday, May 06, 2009 1:20 PM
  • Jason,

    Thanks for taking the time to reply. I have developed a whole bunch of good things for SCCM, one of which is the ability to link from one task sequence to another allowing you to reuse all your task sequence bits over and over again. I use this to build test labs which are all built using server products such as SQL 2008, SCOM, SCCM etc. One of those components is Exchange 2007, a new requirement, and I am now having problems. The problem appears to be the setup.com, which does not execute correctly within a full OSD task sequence but does when advertised as part of a software install task sequence.

    Now, this brings me back to your questions...

    Why would I want to do it??.... Because, sometimes people do things that others have not thought of doing... :) The fact is that anyone who knows enough about task sequences to be building Exchange server environments knows that trying to extend the Active Directory schema from within PE is wasting their time.

    I suspect that there is something going on in the security camps of 2008 server or perhaps the instantiation of the exsetup.exe process. Just for the record thought, the ExchangeSetupLogs folder is not even created. I also suspect that there may be some correlation between this issue and the other issue I raised a few days ago regarding the installation of MSUs during an OSD deployment.

    Thanks for your response. I hope some of the SCCM OSD devs would be prepared to have a look at this and see where the catch is. I am going to start looking at bypassing the Exchange Setup.com and go directly to the exsetup.exe to see if I can get around this little issue.

    Dean
    Wednesday, May 06, 2009 8:28 PM
  • Yeah... like that was ever going to work.... :(

    Well, once again, using exsetup.exe in a Windows Task Sequence works as expected but in the OSD task sequence it does not.... Here are the results of my work... Am I doing something wrong?

    Executing command line: smsswd.exe /run: c:\exch7\setup\serverroles\common\exsetup.exe /PS /sourcedir:c:\exch7
    =======================[ smsswd.exe ] =======================
    PackageID = ''
    BaseVar   = '', ContinueOnError=''
    SwdAction = '0001'
    Getting linked token
    failed to get the token information
    Get RunAs private desktop SMSTS-1117609\SMSTSDesktop
    Run command line under a user account
    Command line for extension .exe is "%1" %*
    Set command line: Run command line
    Working dir 'not set'
    Executing command line: Run command line
    Create a process under given user token
    InstallSoftware
    Unhandled Exception:
    Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Exchange.Diagnostics.ExceptionModeReport' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'Global\netfxeventlog.1.0' is denied.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.Threading.Mutex.<>c__DisplayClass3.<.ctor>b__0(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
       at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
       at System.Diagnostics.SharedUtils.EnterMutex(String name, Mutex& mutex)
       at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
       at System.Diagnostics.EventLog.CreateEventSource(String source, String logName)
       at Microsoft.Exchange.Diagnostics.ExEventLog..ctor(Guid componentGuid, String sourceName)
       at Microsoft.Exchange.Diagnostics.ExceptionModeReport..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.Exchange.Diagnostics.ExceptionModeReport.Finalize()
    Process completed with exit code 3762507597
    Command line returned 3762507597
    Process completed with exit code 3762507597

    At this point, I am giving up with Exchange... This will just have to be a manual process.

    Boo hoo. What a party pooper! 
    Wednesday, May 06, 2009 11:48 PM
  • So what do your TSes look like? Both the one that works and the one that doesn't? OSD TSes definatley do a few special things, like manipulating the GINA.

    Also, when you say that you call one TS from another, are you using a script to do that? Are you doing that in this TS?

    As for why you would want to do this, I understand the need for automation, however, automating something as delicate as upgrading the schema is, to me, playing with fire. Are you attempting to roll out a whole forest at the same time for a testing environment?

    You are clearly getting an access denied to something in the GAC I believe and from the name looks like an event logging componet which would explain why you are not getting any log file. Given that the code you are executing is owned by the Exchange team, they can probably give you a better idea of what's going on. There are a couple of web hits on issues with netfxeventlog but nothing specific.

    Like I said before though, this is still somewhat of a WAG because you're not providing much detail on what you are doing or what the environment looks like.

    "The fact is that anyone who knows enough about task sequences to be building Exchange server environments knows that trying to extend the Active Directory schema from within PE is wasting their time."

    Why this statement? It's not accurate. I can easily use an LDIF file to update the schema from WinPE as long as I have the proper credentials. Or I could use LDP or a host of other tools as the change itself isn't actually happening on the WinPE system, its just being initiated from a tool running on the WinPE system. There's nothing preventing me from that as long as the tool itself will run properly in WinPE. In this case, the tool is .Net based and throwing a .Net exception.
    Jason | http://myitforum.com/cs2/blogs/jsandys
    Thursday, May 07, 2009 12:48 AM
  • How I am doing things and why I am doing them is not quite the issue. I am building entire environments, domains, servers and clusters, the reason does not matter and the environment is too complex to share in this forum. I will be experimenting with Code Access Security settings to see what I get and if this fails I will take this up with official Microsoft support.

    Thanks for you help.
    Thursday, May 07, 2009 1:37 AM
  • Right, I am now of the opinion that this cannot be done. CASPOL settings make no difference to the outcome. :(
    Thursday, May 07, 2009 5:00 AM
  • Have you managed to solve this because i have the same problem when trying to install Exchange 2010 with setup.com during a OSD Deployement (schema is already extended manually)

    http://social.technet.microsoft.com/Forums/en/configmgrgeneral/thread/9ad1d27b-3690-4d7b-add6-951848be5478

     

     


    Tatsumi Morota
    Wednesday, November 17, 2010 8:24 AM