App-v Sequencing Best Practices | Quisitive

Sequencing an application with the Microsoft Application Virtualization (App-V) Sequencer, can be tricky business. However, you can greatly improve the quality of your sequenced applications, by following certain best practices. This will in turn improve your end user’s experience. This blog post is designed to provide tips and best practices for sequencing an application for App-V.

First, let’s start with applications that should not be sequenced. The applications below are ones that either cannot be sequenced due to the limitations of App-V, or the application is not a good candidate for sequencing due to other issues.

The most important part of application sequencing is getting your environment setup properly. If your sequencing environment is not properly setup, your application sequencing will suffer. Below is a list of best practices for setting up your sequencing environment.

  1. Always use a clean Operating System when sequencing applications. It should match the end users environment as close as possible.
  2. It is best to use a virtualized machine for sequencing. Any platform that will allow you to take snapshots, and rollback to previous states would work. This will prevent the need to rebuild the machine after every application sequenced.
  3. When using App-v Sequencer 4.6 non SP1 and below, be sure to configure a dummy printer as well as system and user based dummy ODBC connections. If you are using version 4.6 SP1 these will be created when you install the sequencer. You will still want to confirm they are setup properly.
    Note: for more on this topic refer to my previous post, App-V Sequencer Preparation Scripts
  4. If your end users will be using machines with UAC enabled, ensure that your sequencing machine also has UAC set to the same level.

Now that you have your environment setup, here are a few things to keep in mind prior to beginning the sequencing process.

  1. Shut down all running programs and stop all unnecessary services. This helps prevent against data being captured that is not relevant to the application being sequenced. Some common examples are listed below.
    A. Windows Defender
    B. Antivirus software
    C. Disk defragmentation software
    D. Windows SearchE.Microsoft Update
    F. Any open Windows Explorer session
    G. SMS Agent Host
    H. Disk Defragmenter
    I. Windows Media Player
    Note:for more on this topic refer to my previous post, App-V Sequencer Preparation Scripts
  2. Check for App-v Accelerators and Recipes to see if someone else has already sequenced the application. There is no need to reinvent the wheel if someone has already done it.
    A. TechNet Gallery: App-V Package Accelerators – http://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=App-V&f%5B0%5D.Text=App-V
    B. TechNet App-V Sequencing Recipe Forum – http://social.technet.microsoft.com/Forums/en-US/prescriptiveguidance

Once you have begun the sequencing process, following these tips can help ensure your sequencing goes smoothly.

  1. Always perform a full install.  Do not select the “install on first use” option.
  2. Automatic updates should be disabled for the sequenced application.
  3. Once the install has finished, launch the application multiple times until it remains static during the startup.

Finally, the following are some useful post sequencing tips when you are modifying or customizing your packages.

  1. Only compress packages that exceed 4GB, or if the application will be streamed over a slow network.
  2. Check the Virtual Registry for unneeded entries and remove them from the sequenced application.
    Below is a list of common registry entries which should be deleted from your package. Keep in mind that all applications are different, and some may require entries in these keys.

    User
    HKCUSoftwareMicrosoftEventSystem
    HKCUSoftwareMicrosoftSystemCertificates
    HKCUSOFTWAREMicrosoftTracing
    HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings
    HKCUSoftwareMicrosoftWindowsCurrentVersionRun
    HKCUSoftwareMicrosoftWindowsCurrentVersionRunonce
    HKCUSoftwareMicrosoftWindowsCurrentVersionUninstall
    HKCUSOFTWAREPolicies

    Machine
    HKLMHardware
    HKLMSAM
    HKLMSecurity
    HKLMSoftwareMicrosoftEventSystem
    HKLMSOFTWAREMicrosoftRpc
    HKLMSoftwareMicrosoftSystemCertificates
    HKLMSOFTWAREMicrosoftTracing
    HKLMSOFTWAREMicrosoftWBEM
    HKLMSoftwareMicrosoftWindowsCurrentVersionInternet Settings
    HKLMSoftwareMicrosoftWindowsCurrentVersionRun
    HKLMSoftwareMicrosoftWindowsCurrentVersionRunonce
    HKLMSoftwareMicrosoftWindowsCurrentVersionUninstall
    HKLMSOFTWAREPolicies
    HKLMSystemCurrentControlSetControlTimeZoneInformation
    HKLMSystemCurrentControlSetServicesDHCPHKLMSystemCurrentControlSetServicesEventlog
  3. Only enable LOCAL_INTERACTION_ALLOWED if absolutely necessary.
  4. Check for unneeded files and folders.
    Below is a list of common file and folders entries which should be deleted from your package. As with the registry entries, keep in mind that all applications are different and some may require these files or folders.

    Files
    Any files that refer to the sequencing machine or userAutoexec.bat
    Cache files
    Certificates not directly related to the application
    Config.sys
    Cookies
    Install log files
    Internet Explorer History
    Pagefile.sys
    Service Host LMHost files
    User.dat

    Folders
    %TEMP% folders
    C:WINDOWSCSC
    C:WINDOWSPrefetch
    C:WINDOWSrepair
    C:WINDOWSSystem32appmgmt
    C:WINDOWSSystem32CatRoot
    C:WINDOWSSystem32CCM
    C:WINDOWSSystem32Config
    C:WINDOWSSystem32dllcache
    C:WINDOWSSystem32wbem
    C:WINDOWSTasks

I ran into this issue where the RMSe Installation would fail at the Data warehouse configuration during Operations Manager Setup. 

Issue:

The install fails at the DW installation….and a warning is seen for the Management Server Install, then subsequent red X Critical Failures below.

Assumptions:

Error:

The OpsMgrSetupWizard.log states the following interesting section where the Error begins.

[14:38:27]: Error: :RemoveVssExpressWriter failed with the following exception: : Threw Exception.Type: System.Reflection.TargetInvocationException, Exception Error Code: 0x80131604, Exception.Message: Exception has been thrown by the target of an invocation.
[14:38:27]: Error: :StackTrace:   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

[14:37:43]:    Always:    :Management Server DENAPP08.amr.ch2m.com failed to connect, now trying another one.
[14:37:43]:    Warn:    :Failed to connect to any SDK in the management group, trying again
[14:38:03]:    Error:    :Error:Could not connect to management group. Can not continue with DW upgrade…
[14:38:03]:    Info:    :Info:got MG connection
[14:38:03]:    Error:    :Error:Could not connect to management group. Cannot continue with current action…
[14:38:03]:    Error:    :FATAL ACTION: GetManagementGroup
[14:38:03]:    Error:    :FATAL ACTION: DWInstallActionsPostProcessor
[14:38:03]:    Error:    :ProcessInstalls: Running the PostProcessDelegate returned false.
[14:38:03]:    Always:    :SetErrorType: Setting VitalFailure. currentInstallItem: Data Warehouse Configuration
[14:38:03]:    Error:    :ProcessInstalls: Running the PostProcessDelegate for OMDATAWAREHOUSE failed…. This is a fatal item.  Setting rollback.
[14:38:03]:    Info:    :SetProgressScreen: FinishMinorStep.
[14:38:03]:    Always:    :!***** Installing: OMCONSOLE ***
[14:38:03]:    Info:    :ProcessInstalls: Rollback is set and we are not doing an uninstall so we will stop processing installs
[14:38:03]:    Always:    :****************************************************************
[14:38:03]:    Always:    :****Starting*RollBack*******************************************
[14:38:03]:    Always:    :****************************************************************

I tried the following, but not limited to:

Workaround:

Perform the installation for creation of OperationsManager and OperationsManagerDW to the default location of User database files as configured on the SQL instance.  When the installer completes successully, then you can manually move the OperationsManagerDW to the preferred disk.

Additional Logs:

[14:33:54]:    Always:    :Current Action: CreateDataWarehouse
[14:33:54]:    Always:    :Creating DataWarehouse Database
[14:33:54]:    Info:    :Info:Using DB command timeout = 480 seconds.
[14:33:54]:    Info:    :Adding Script files to dictionary.
[14:33:54]:    Info:    :
    .\build_mom_dw_admin.sql
[14:33:54]:    Info:    :Added
    .\build_mom_dw_admin.sql
   to the dictionary.
[14:33:54]:    Info:    :
    .\Datawarehouse.Initial.Setup.sql
[14:33:54]:    Info:    :Added
    .\Datawarehouse.Initial.Setup.sql
   to the dictionary.
[14:33:54]:    Info:    :
    .\build_momv3_dw_localization.sql
[14:33:54]:    Info:    :Added
    .\build_momv3_dw_localization.sql
   to the dictionary.
[14:33:54]:    Info:    :
    .\Datawarehouse.OM12.Upgrade.sql
[14:33:54]:    Info:    :Not Added to dictionary:
    .\Datawarehouse.OM12.Upgrade.sql
[14:33:54]:    Info:    :Done loading scripts
[14:33:54]:    Info:    :Info:Connecting to Remote SQL server SCOMDB.domain.com
[14:33:54]:    Info:    :Info:Connecting to Remote SQL server SCOMDB.domain.com
[14:33:54]:    Always:    :Creating Database: OperationsManagerDW
[14:33:57]:    Always:    :Running first set of configuration scripts.
[14:33:57]:    Info:    :Info:Using DB command timeout = 1800 seconds.
[14:33:57]:    Info:    :Adding Script files to dictionary.
[14:33:57]:    Info:    :
    .\build_mom_dw_admin.sql
[14:33:57]:    Info:    :Added
    .\build_mom_dw_admin.sql
   to the dictionary.
[14:33:57]:    Info:    :
    .\Datawarehouse.Initial.Setup.sql
[14:33:57]:    Info:    :Added
    .\Datawarehouse.Initial.Setup.sql
   to the dictionary.
[14:33:57]:    Info:    :
    .\build_momv3_dw_localization.sql
[14:33:57]:    Info:    :Added
    .\build_momv3_dw_localization.sql
   to the dictionary.
[14:33:57]:    Info:    :
    .\Datawarehouse.OM12.Upgrade.sql
[14:33:57]:    Info:    :Not Added to dictionary:
    .\Datawarehouse.OM12.Upgrade.sql
[14:33:57]:    Info:    :Done loading scripts
[14:33:57]:    Always:    :Running standard DB Configuration scripts.
[14:35:27]:    Always:    :Running DataWarehouse Database configuration scripts
[14:35:27]:    Info:    :Info:Using DB command timeout = 1800 seconds.
[14:35:27]:    Info:    :Adding Script files to dictionary.
[14:35:27]:    Info:    :
    .\build_mom_dw_admin.sql
[14:35:27]:    Info:    :Added
    .\build_mom_dw_admin.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\Datawarehouse.Initial.Setup.sql
[14:35:27]:    Info:    :Added
    .\Datawarehouse.Initial.Setup.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\build_momv3_dw_localization.sql
[14:35:27]:    Info:    :Added
    .\build_momv3_dw_localization.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\Datawarehouse.OM12.Upgrade.sql
[14:35:27]:    Info:    :Not Added to dictionary:
    .\Datawarehouse.OM12.Upgrade.sql
[14:35:27]:    Info:    :Done loading scripts
[14:35:27]:    Always:    :Setting Auto Close off..
[14:35:27]:    Always:    :Running DW Sql strings now…
[14:35:27]:    Info:    :CreateDataWarehouse completed.
[14:35:27]:    Always:    :Current Action: RunDWExistingMGStrings
[14:35:27]:    Always:    :Running DataWarehouse Database configuration scripts
[14:35:27]:    Info:    :Info:Using DB command timeout = 1800 seconds.
[14:35:27]:    Info:    :Adding Script files to dictionary.
[14:35:27]:    Info:    :
    .\build_mom_dw_admin.sql
[14:35:27]:    Info:    :Added
    .\build_mom_dw_admin.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\Datawarehouse.Initial.Setup.sql
[14:35:27]:    Info:    :Added
    .\Datawarehouse.Initial.Setup.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\build_momv3_dw_localization.sql
[14:35:27]:    Info:    :Added
    .\build_momv3_dw_localization.sql
   to the dictionary.
[14:35:27]:    Info:    :
    .\Datawarehouse.OM12.Upgrade.sql
[14:35:27]:    Info:    :Not Added to dictionary:
    .\Datawarehouse.OM12.Upgrade.sql
[14:35:27]:    Info:    :Done loading scripts
[14:35:27]:    Always:    :Running DW Sql strings now…
[14:35:27]:    Info:    :RunDWExistingMGStrings completed.
[14:35:27]:    Always:    :Current Action: GetManagementGroup
[14:35:27]:    Info:    :Info:getting MG connection
[14:35:27]:    Info:    :Info:trying to connect with server server01.domain.com
[14:35:33]:    Info:    :Info:Error while connecting to management server: The Data Access service is either not running or not yet initialized. Check the event log for more information.
[14:35:33]:    Error:    :Couldn’t connect to mgt server stack: : Threw Exception.Type: Microsoft.EnterpriseManagement.Common.ServiceNotRunningException, Exception Error Code: 0x80131500, Exception.Message: The Data Access service is either not running or not yet initialized. Check the event log for more information.

Today I was working with a client who has completed a pilot project for Office 365. The Admin was working on prepping to move all mailboxes to the cloud when he came upon a problem.

The company had just hired a new employee, and instead of creating the user’s mailbox in the on-premises Exchange 2007 Organization, he decided to create it in Exchange Online. The Active Directory account had already been created, so he went to the Exchange Management Console (EMC), selected the On-Premises Organization, right mouse clicked on the Recipient Container and selected “New Remote Mailbox”.

Problem with this is that you cannot create a Remote Mailbox for an existing user using the EMC; you only have the option of creating a new user and the mailbox. Ok, easy enough, if the EMC can’t do it I’m sure you can do it via the Exchange Management Shell (EMS). Yep sure enough a quick search found this, http://technet.microsoft.com/en-us/library/ff625227.aspx.

He went ahead and used the Enable-RemoteMailbox Command, as described in the TechNet site, problem #2, this returns an error that the Address is invalid for the Routing Address.

He contacted me and a quick Bing search found Steve Goodman’s Exchange Blog and the fix. Seems that Microsoft neglected to mention the need for the –RemoteRoutingAddress parameter when using the Enable-RemoteMailbox command. Thanks to Steve’s blog post, the issue was quickly resolved.

From Steve’s Blog:

When enabling the remote mailbox, use the –RemoteRoutingAddress parameter, specifying your alias and service domain/Office 365 tenant, for example:

Enable-RemoteMailbox <username> -RemoteRoutingAddress <alias>@<tenantName>.mail.onmicrosoft.com