自动执行移动服务安装Automate Mobility Service installation

本文介绍如何在 Azure Site Recovery 中自动安装和更新移动服务代理。This article describes how to automate installation and updates for the Mobility service agent in Azure Site Recovery.

如要部署 Site Recovery 以实现本地 VMware VM 和物理服务器灾难恢复到 Azure,请在每个要复制的计算机上安装移动服务代理。When you deploy Site Recovery for disaster recovery of on-premises VMware VMs and physical servers to Azure, you install the Mobility service agent on each machine you want to replicate. 移动服务可以捕获计算机上的数据写入,并将其转发到 Site Recovery 进程服务器进行复制。The Mobility service captures data writes on the machine, and forwards them to the Site Recovery process server for replication. 可以通过以下方式部署移动服务:You can deploy the Mobility Service in a couple of ways:

  • 推送安装:在 Azure 门户中为计算机启用复制后,让 Site Recovery 安装移动服务代理。Push installation: Let Site Recovery install the Mobility service agent when you enable replication for a machine in the Azure portal.
  • 手动安装:在每台计算机上手动安装移动服务。Manual installation: Install the Mobility service manually on each machine. 详细了解有关推送和手动安装的信息。Learn more about push and manual installation.
  • 自动部署:使用 System Center Configuration Manager 等软件部署工具或 Intigua JetPatch 等第三方工具自动完成安装。Automated deployment: Automate installation with software deployment tools such as System Center Configuration Manager, or third-party tools such as Intigua JetPatch.

如果出现以下情况,自动安装和更新可以提供解决方案:Automated installation and updating provides a solution if:

  • 组织不允许在受保护的服务器上进行推送安装。Your organization doesn't allow for push installation on protected servers.
  • 公司策略要求定期更改密码。Your company policy requires passwords to be changed periodically. 必须为推送安装指定密码。You have to specify a password for the push installation.
  • 安全策略不允许为特定计算机添加防火墙例外项。Your security policy doesn't permit adding firewall exceptions for specific machines.
  • 你是托管服务提供商,且不想向 Site Recovery 提供进行推送安装所需的客户计算机凭据。You're acting as a hosting service provider and don't want to provide customer machine credentials that are needed for push installation with Site Recovery.
  • 需要将代理安装同时扩展到大量服务器。You need to scale gent installation to lots of servers simultaneously.
  • 需要在计划内维护时段内规划安装和升级。You want to schedule installations and upgrades during planned maintenance windows.

必备条件Prerequisites

对于自动安装,需实现以下各项:For automated installation you need the following:

准备自动部署Prepare for automated deployment

下表总结了自动执行移动服务部署的工具和过程。The following table summarizes tools and processes for automating Mobility service deployment.

工具Tool 详细信息Details 说明Instructions
配置管理器Configuration Manager 1.验证是否已满足上述先决条件1. Verify that you have the prerequisites listed above in place.

2.通过设置源环境来部署灾难恢复,包括使用 OVF 模板下载 OVA 文件以将 Site Recovery 配置服务器部署为 VMware VM。2. Deploy disaster recovery by setting up the source environment, including downloading an OVA file to deploy the Site Recovery configuration server as a VMware VM using an OVF template.

2.将配置服务器注册到 Site Recovery 服务,设置目标 Azure 环境,并配置复制策略。2. You register the configuration server with the Site Recovery service, set up the target Azure environment, and configure a replication policy.

3.对于移动服务自动部署,请创建包含配置服务器密码和移动服务安装文件的网络共享。3. For automated Mobility service deployment, you create a network share containing the configuration server passphrase and Mobility service installation files.

4.创建包含安装或更新的 Configuration Manager 包,并为移动服务部署做好准备。4. You create a Configuration Manager package containing the installation or updates, and prepare for Mobility service deployment.

5.然后,可以为已安装移动服务的计算机启用复制到 Azure 选项。5. You can then enable replication to Azure for the machines that have the Mobility service installed.
通过 Configuration Manager 自动安装Automate with Configuration Manager.
JetPatchJetPatch 1.验证是否已满足上述先决条件1. Verify that you have the prerequisites listed above in place.

2.设置源环境以部署灾难恢复,包括使用 OVF 模板在 Site Recovery 环境中下载和部署用于 Azure Site Recovery 的 JetPatch 代理程序管理器。2. Deploy disaster recovery by setting up the source environment, including downloading and deploying JetPatch Agent Manager for Azure Site Recovery in your Site Recovery environment, using an OVF template.

2.将配置服务器注册到 Site Recovery,设置目标 Azure 环境,并配置复制策略。2. You register the configuration server with Site Recovery, set up the target Azure environment, and configure a replication policy.

3.对于自动部署,初始化并完成 JetPatch 代理程序管理器配置。3. For automated deployment, initialize and complete the JetPatch Agent Manager configuration.

4.在 JetPatch 中,可以创建 Site Recovery 策略以自动部署和升级移动服务代理。4. In JetPatch you can create a Site Recovery policy to automate deployment and upgrade of the Mobility service agent.

5.然后,可以为已安装移动服务的计算机启用复制到 Azure 选项。5. You can then enable replication to Azure for the machines that have the Mobility service installed.
通过 JetPatch 代理程序管理器自动安装Automate with JetPatch Agent Manager.

在 JetPatch 中排查代理安装的问题Troubleshoot agent installation in JetPatch.

通过 Configuration Manager 自动安装Automate with Configuration Manager

准备安装文件Prepare the installation files

  1. 确保已满足先决条件。Make sure you have the prerequisites in place.

  2. 创建可以通过配置服务器上运行的计算机访问的安全网络文件共享(SMB 共享)。Create a secure network file share (SMB share) that can be accessed by the machine running the configuration server.

  3. 在 Configuration Manager 中,对要安装或更新移动服务的服务器进行分类In Configuration Manager, categorize the servers on which you want to install or update the Mobility service. 其中一个集合应包含所有 Windows 服务器,而另一个集合应包含所有 Linux 服务器。One collection should contain all Windows servers, the other all Linux server.

  4. 在网络共享上,创建文件夹:On the network share, create a folder:

    • 若要在 Windows 计算机上安装,请创建 MobSvcWindows 文件夹 。For installation on Windows machines, create a folder MobSvcWindows.
    • 若要在 Linux 计算机上安装,请创建 MobSvcLinux 文件夹 。For installation on Linux machines, create a folder MobSvcLinux.
  5. 登录到配置服务器计算机。Sign in to the configuration server machine.

  6. 在计算机上打开管理员命令提示符。On the machine, open an admin command prompt.

  7. 运行以下命令生成密码文件:Run this command to generate the passphrase file:

    cd %ProgramData%\ASR\home\svsystems\bin
    genpassphrase.exe -v > MobSvc.passphrase
    
  8. 将 MobSvc.passphrase 文件复制到 Windows 文件夹或 Linux 文件夹。Copy the MobSvc.passphrase file to the Windows folder, and to the Linux folder.

  9. 运行以下命令浏览包含安装文件的文件夹:Run this command to browse to the folder containing the installation files:

    cd %ProgramData%\ASR\home\svsystems\pushinstallsvc\repository
    
  10. 将以下安装文件复制到网络共享:Copy these installation files to the network share:

    • 对于 MobSvcWindows,请复制 Microsoft-ASR_UA_version_Windows_GA_date_Release.exe To MobSvcWindows, copy Microsoft-ASR_UA_version_Windows_GA_date_Release.exe
    • 对于 MobSvcLinux,请复制以下文件 :To MobSvcLinux, copy:
      • Microsoft-ASR_UARHEL6-64release.tar.gz Microsoft-ASR_UARHEL6-64release.tar.gz
      • Microsoft-ASR_UARHEL7-64release.tar.gz Microsoft-ASR_UARHEL7-64release.tar.gz
      • Microsoft-ASR_UASLES11-SP3-64release.tar.gz Microsoft-ASR_UASLES11-SP3-64release.tar.gz
      • Microsoft-ASR_UASLES11-SP4-64release.tar.gz Microsoft-ASR_UASLES11-SP4-64release.tar.gz
      • Microsoft-ASR_UAOL6-64release.tar.gzMicrosoft-ASR_UAOL6-64release.tar.gz
      • Microsoft-ASR_UAUBUNTU-14.04-64release.tar.gz Microsoft-ASR_UAUBUNTU-14.04-64release.tar.gz
  11. 按照如下步骤所述,将代码复制到 Windows 或 Linux 文件夹。Copy code to the Windows or Linux folders, as described in the next procedures. 假设:We're assuming that:

    • 配置服务器的 IP 地址为 192.168.3.121。The IP address of the configuration server is 192.168.3.121.
    • 安全网络文件共享为 \\ContosoSecureFS\MobilityServiceInstallers 。The secure network file share is \\ContosoSecureFS\MobilityServiceInstallers.

将代码复制到 Windows 文件夹Copy code to the Windows folder

复制以下代码:Copy the following code:

  • 在 MobSvcWindows 文件夹中将其保存为 install.bat 。Save it as install.bat in the MobSvcWindows folder.

  • 将此脚本中的 [CSIP] 占位符替换为配置服务器的实际 IP 地址值。Replace the [CSIP] placeholders in this script with the actual values of the IP address of your configuration server.

  • 此脚本支持移动服务代理的全新安装和已安装代理的更新。The script supports new installations of the Mobility service agent, and updates to agents that are already installed.

    Time /t >> C:\Temp\logfile.log
    REM ==================================================
    REM ==== Clean up the folders ========================
    RMDIR /S /q %temp%\MobSvc
    MKDIR %Temp%\MobSvc
    MKDIR C:\Temp
    REM ==================================================
    
    REM ==== Copy new files ==============================
    COPY M*.* %Temp%\MobSvc
    CD %Temp%\MobSvc
    REN Micro*.exe MobSvcInstaller.exe
    REM ==================================================
    
    REM ==== Extract the installer =======================
    MobSvcInstaller.exe /q /x:%Temp%\MobSvc\Extracted
    REM ==== Wait 10s for extraction to complete =========
    TIMEOUT /t 10
    REM =================================================
    
    REM ==== Perform installation =======================
    REM =================================================
    
    CD %Temp%\MobSvc\Extracted
    whoami >> C:\Temp\logfile.log
    SET PRODKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
    REG QUERY %PRODKEY%\{275197FC-14FD-4560-A5EB-38217F80CBD1}
    IF NOT %ERRORLEVEL% EQU 0 (
        echo "Product is not installed. Goto INSTALL." >> C:\Temp\logfile.log
        GOTO :INSTALL
    ) ELSE (
        echo "Product is installed." >> C:\Temp\logfile.log
    
        echo "Checking for Post-install action status." >> C:\Temp\logfile.log
        GOTO :POSTINSTALLCHECK
    )
    
    :POSTINSTALLCHECK
        REG QUERY "HKLM\SOFTWARE\Wow6432Node\InMage Systems\Installed Products\5" /v "PostInstallActions" | Find "Succeeded"
        If %ERRORLEVEL% EQU 0 (
            echo "Post-install actions succeeded. Checking for Configuration status." >> C:\Temp\logfile.log
            GOTO :CONFIGURATIONCHECK
        ) ELSE (
            echo "Post-install actions didn't succeed. Goto INSTALL." >> C:\Temp\logfile.log
            GOTO :INSTALL
        )
    
    :CONFIGURATIONCHECK
        REG QUERY "HKLM\SOFTWARE\Wow6432Node\InMage Systems\Installed Products\5" /v "AgentConfigurationStatus" | Find "Succeeded"
        If %ERRORLEVEL% EQU 0 (
            echo "Configuration has succeeded. Goto UPGRADE." >> C:\Temp\logfile.log
            GOTO :UPGRADE
        ) ELSE (
            echo "Configuration didn't succeed. Goto CONFIGURE." >> C:\Temp\logfile.log
            GOTO :CONFIGURE
        )
    
    :INSTALL
        echo "Perform installation." >> C:\Temp\logfile.log
        UnifiedAgent.exe /Role MS /InstallLocation "C:\Program Files (x86)\Microsoft Azure Site Recovery" /Platform "VmWare" /Silent
        IF %ERRORLEVEL% EQU 0 (
            echo "Installation has succeeded." >> C:\Temp\logfile.log
            (GOTO :CONFIGURE)
        ) ELSE (
            echo "Installation has failed." >> C:\Temp\logfile.log
            GOTO :ENDSCRIPT
        )
    
    :CONFIGURE
        echo "Perform configuration." >> C:\Temp\logfile.log
        cd "C:\Program Files (x86)\Microsoft Azure Site Recovery\agent"
        UnifiedAgentConfigurator.exe  /CSEndPoint "[CSIP]" /PassphraseFilePath %Temp%\MobSvc\MobSvc.passphrase
        IF %ERRORLEVEL% EQU 0 (
            echo "Configuration has succeeded." >> C:\Temp\logfile.log
        ) ELSE (
            echo "Configuration has failed." >> C:\Temp\logfile.log
        )
        GOTO :ENDSCRIPT
    
    :UPGRADE
        echo "Perform upgrade." >> C:\Temp\logfile.log
        UnifiedAgent.exe /Platform "VmWare" /Silent
        IF %ERRORLEVEL% EQU 0 (
            echo "Upgrade has succeeded." >> C:\Temp\logfile.log
        ) ELSE (
            echo "Upgrade has failed." >> C:\Temp\logfile.log
        )
        GOTO :ENDSCRIPT
    
    :ENDSCRIPT
        echo "End of script." >> C:\Temp\logfile.log
    
    

将代码复制到 Linux 文件夹Copy code to the Linux folder

复制以下代码:Copy the following code:

  • 在 MobSvcLinux 文件夹中将其保存为 install_linux.sh 。Save it as install_linux.sh in the MobSvcLinux folder.

  • 将此脚本中的 [CSIP] 占位符替换为配置服务器的实际 IP 地址值。Replace the [CSIP] placeholders in this script with the actual values of the IP address of your configuration server.

  • 此脚本支持移动服务代理的全新安装和已安装代理的更新。The script supports new installations of the Mobility service agent, and updates to agents that are already installed.

    #!/usr/bin/env bash
    
    rm -rf /tmp/MobSvc
    mkdir -p /tmp/MobSvc
    INSTALL_DIR='/usr/local/ASR'
    VX_VERSION_FILE='/usr/local/.vx_version'
    
    echo "=============================" >> /tmp/MobSvc/sccm.log
    echo `date` >> /tmp/MobSvc/sccm.log
    echo "=============================" >> /tmp/MobSvc/sccm.log
    
    if [ -f /etc/oracle-release ] && [ -f /etc/redhat-release ]; then
        if grep -q 'Oracle Linux Server release 6.*' /etc/oracle-release; then
            if uname -a | grep -q x86_64; then
                OS="OL6-64"
                echo $OS >> /tmp/MobSvc/sccm.log
                cp *OL6*.tar.gz /tmp/MobSvc
            fi
        fi
    elif [ -f /etc/redhat-release ]; then
        if grep -q 'Red Hat Enterprise Linux Server release 6.* (Santiago)' /etc/redhat-release || \
            grep -q 'CentOS Linux release 6.* (Final)' /etc/redhat-release || \
            grep -q 'CentOS release 6.* (Final)' /etc/redhat-release; then
            if uname -a | grep -q x86_64; then
                OS="RHEL6-64"
                echo $OS >> /tmp/MobSvc/sccm.log
                cp *RHEL6*.tar.gz /tmp/MobSvc
            fi
        elif grep -q 'Red Hat Enterprise Linux Server release 7.* (Maipo)' /etc/redhat-release || \
            grep -q 'CentOS Linux release 7.* (Core)' /etc/redhat-release; then
            if uname -a | grep -q x86_64; then
                OS="RHEL7-64"
                echo $OS >> /tmp/MobSvc/sccm.log
                cp *RHEL7*.tar.gz /tmp/MobSvc
                    fi
        fi
    elif [ -f /etc/SuSE-release ] && grep -q 'VERSION = 11' /etc/SuSE-release; then
        if grep -q "SUSE Linux Enterprise Server 11" /etc/SuSE-release && grep -q 'PATCHLEVEL = 3' /etc/SuSE-release; then
            if uname -a | grep -q x86_64; then
                OS="SLES11-SP3-64"
                echo $OS >> /tmp/MobSvc/sccm.log
                cp *SLES11-SP3*.tar.gz /tmp/MobSvc
            fi
        elif grep -q "SUSE Linux Enterprise Server 11" /etc/SuSE-release && grep -q 'PATCHLEVEL = 4' /etc/SuSE-release; then
            if uname -a | grep -q x86_64; then
                OS="SLES11-SP4-64"
                echo $OS >> /tmp/MobSvc/sccm.log
                cp *SLES11-SP4*.tar.gz /tmp/MobSvc
            fi
        fi
    elif [ -f /etc/lsb-release ] ; then
        if grep -q 'DISTRIB_RELEASE=14.04' /etc/lsb-release ; then
           if uname -a | grep -q x86_64; then
               OS="UBUNTU-14.04-64"
               echo $OS >> /tmp/MobSvc/sccm.log
               cp *UBUNTU-14*.tar.gz /tmp/MobSvc
           fi
        fi
    else
        exit 1
    fi
    
    if [ -z "$OS" ]; then
        exit 1
    fi
    
    Install()
    {
        echo "Perform Installation." >> /tmp/MobSvc/sccm.log
        ./install -q -d ${INSTALL_DIR} -r MS -v VmWare
        RET_VAL=$?
        echo "Installation Returncode: $RET_VAL" >> /tmp/MobSvc/sccm.log
        if [ $RET_VAL -eq 0 ]; then
            echo "Installation has succeeded. Proceed to configuration." >> /tmp/MobSvc/sccm.log
            Configure
        else
            echo "Installation has failed." >> /tmp/MobSvc/sccm.log
            exit $RET_VAL
        fi
    }
    
    Configure()
    {
        echo "Perform configuration." >> /tmp/MobSvc/sccm.log
        ${INSTALL_DIR}/Vx/bin/UnifiedAgentConfigurator.sh -i [CSIP] -P MobSvc.passphrase
        RET_VAL=$?
        echo "Configuration Returncode: $RET_VAL" >> /tmp/MobSvc/sccm.log
        if [ $RET_VAL -eq 0 ]; then
            echo "Configuration has succeeded." >> /tmp/MobSvc/sccm.log
        else
            echo "Configuration has failed." >> /tmp/MobSvc/sccm.log
            exit $RET_VAL
        fi
    }
    
    Upgrade()
    {
        echo "Perform Upgrade." >> /tmp/MobSvc/sccm.log
        ./install -q -v VmWare
        RET_VAL=$?
        echo "Upgrade Returncode: $RET_VAL" >> /tmp/MobSvc/sccm.log
        if [ $RET_VAL -eq 0 ]; then
            echo "Upgrade has succeeded." >> /tmp/MobSvc/sccm.log
        else
            echo "Upgrade has failed." >> /tmp/MobSvc/sccm.log
            exit $RET_VAL
        fi
    }
    
    cp MobSvc.passphrase /tmp/MobSvc
    cd /tmp/MobSvc
    
    tar -zxvf *.tar.gz
    
    if [ -e ${VX_VERSION_FILE} ]; then
        echo "${VX_VERSION_FILE} exists. Checking for configuration status." >> /tmp/MobSvc/sccm.log
        agent_configuration=$(grep ^AGENT_CONFIGURATION_STATUS "${VX_VERSION_FILE}" | cut -d"=" -f2 | tr -d " ")
        echo "agent_configuration=$agent_configuration" >> /tmp/MobSvc/sccm.log
         if [ "$agent_configuration" == "Succeeded" ]; then
            echo "Agent is already configured. Proceed to Upgrade." >> /tmp/MobSvc/sccm.log
            Upgrade
        else
            echo "Agent is not configured. Proceed to Configure." >> /tmp/MobSvc/sccm.log
            Configure
        fi
    else
        Install
    fi
    
    cd /tmp
    
    

创建包Create a package

  1. 登录到“Configuration Manager 控制台”>“软件库” > “应用程序管理” > “包” 。Sign in to the Configuration Manager console > Software Library > Application Management > Packages.

  2. 右键单击“包” > “创建包” 。Right-click Packages > Create Package.

  3. 提供包详细信息,包括“名称”、“说明”、“制造商”、“语言”和“版本”。Provide package details including a name, description, manufacturer, language, and version.

  4. 选中“此包包含源文件” 。Select This package contains source files.

  5. 单击“浏览”,然后选择包含相关安装程序(MobSvcWindows 或 MobSvcLinux)的网络共享和文件夹,然后单击“下一步” 。Click Browse, and select the network share and folder containing the relevant installer (MobSvcWindows or MobSvcLinux) Then click Next.

    创建包和程序向导的屏幕截图

  6. 在“选择要创建的程序类型”页上,选择“标准程序” > “下一步” 。In Choose the program type that you want to create page, select Standard Program > Next.

    创建包和程序向导的屏幕截图

  7. 在“指定此标准程序的相关信息”页上,指定以下值 :In Specify information about this standard program page, specify the following values:

    参数Parameter Windows 值 Windows value Linux 值 Linux value
    名称Name 安装 Azure 移动服务 (Windows)Install Azure Mobility Service (Windows) 安装 Azure 移动服务 (Linux)。Install Azure Mobility Service (Linux).
    命令行Command line install.batinstall.bat ./install_linux.sh./install_linux.sh
    程序可运行 Program can run 用户是否已登录Whether or not a user is logged on 用户是否已登录Whether or not a user is logged on
    其他参数 Other parameters 使用默认设置Use default setting 使用默认设置Use default setting

    创建包和程序向导的屏幕截图

  8. 在“指定此标准程序的要求”中,执行以下操作 :In Specify the requirements for this standard program, do the following:

    • 对于 Windows 计算机,选择“此程序只能在指定的平台上运行” 。For Windows machines, select This program can run only on specified platforms. 然后选择支持的 Windows 操作系统Then select the supported Windows operating systems. Then click Next.
    • 对于 Linux 计算机,选择“此程序可在任何平台上运行” 。For Linux machines, select This program can run on any platform. Then click Next.
  9. 完成该向导。Finish the wizard.

部署包Deploy the package

  1. 在 Configuration Manager 控制台中,右键单击“包”>“分发内容” 。In the Configuration Manager console, right-click the package > Distribute Content. Configuration Manager 控制台的屏幕截图Screenshot of Configuration Manager console

  2. 选择包应复制到的分发点。Select the distribution points on to which the packages should be copied. 了解详细信息Learn more.

  3. 完成该向导。Complete the wizard. 包随后开始复制到指定的分发点。The package then starts replicating to the specified distribution points.

  4. 完成包分发后,右键单击“包”>“部署” 。After the package distribution finishes, right-click the package > Deploy. Configuration Manager 控制台的屏幕截图Screenshot of Configuration Manager console

  5. 选择之前创建的 Windows 或 Linux 设备集合。Select the Windows or Linux device collection you created previously.

  6. 在“指定内容目标”页上,选择“分发点” 。On the Specify the content destination page, select Distribution Points.

  7. 在“指定设置以控制此软件的部署方式”页上,将“目的”设置为“必需” 。In Specify settings to control how this software is deployed page, set Purpose to Required.

    部署软件向导的屏幕截图

  8. 在“为此部署指定计划”中设置计划 。In Specify the schedule for this deployment, set up a schedule. 了解详细信息Learn more.

    • 移动服务按指定计划进行安装。The Mobility service is installed in accordance with the schedule you specify.
    • 为了避免不必要的重新启动,请在每月的维护时段或软件更新时段计划包安装。To avoid unnecessary reboots, schedule the package installation during your monthly maintenance window or software updates window.
  9. 在“分发点”页上,配置设置并完成向导 。On the Distribution Points page, configure settings and finish the wizard.

  10. 在 Configuration Manager 控制台中监视部署进度。Monitor deployment progress in the Configuration Manager console. 转到“监视” > “部署” > “[包名称]” 。Go to Monitoring > Deployments > [your package name].

卸载移动服务Uninstall the Mobility service

可以创建用于卸载移动服务的 Configuration Manager 包。You can create Configuration Manager packages to uninstall Mobility Service. 使用以下脚本执行相关操作:Use the following script to do so:

Time /t >> C:\logfile.log
REM ==================================================
REM ==== Check if Mob Svc is already installed =======
REM ==== If not installed no operation required ========
REM ==== Else run uninstall command =====================
REM ==== {275197FC-14FD-4560-A5EB-38217F80CBD1} is ====
REM ==== guid for Mob Svc Installer ====================
whoami >> C:\logfile.log
NET START | FIND "InMage Scout Application Service"
IF  %ERRORLEVEL% EQU 1 (GOTO :INSTALL) ELSE GOTO :UNINSTALL
:NOOPERATION
                echo "No Operation Required." >> c:\logfile.log
                GOTO :ENDSCRIPT
:UNINSTALL
                echo "Uninstall" >> C:\logfile.log
                MsiExec.exe /qn /x {275197FC-14FD-4560-A5EB-38217F80CBD1} /L+*V "C:\ProgramData\ASRSetupLogs\UnifiedAgentMSIUninstall.log"
:ENDSCRIPT

后续步骤Next steps

现在,为 VM 启用保护Now enable protection for VMs.