RN200951: How to upgrade the Data Hub Agent through UEM

Description

This article shows you how to utilise Raynet One UEM to upgrade your Data Hub Agents that run on UEM managed devices.  The following process has been tested against 12.5 and 12.6 Data Hub Agent devices.  

 

Pre-requisites

  • DotNet Core Uninstaller:  https://learn.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool-overview?pivots=os-windows
  • Latest version of the .Net 8.0 hosting bundle:  https://dotnet.microsoft.com/en-us/download/dotnet/8.0
  • A 14.1.x Data Hub Agent
  • One of the two attached MST files (ps1ca.mst = enables Powershell connectors, ps1sslca.mst = enables Powershell connectors and SSL certificate validation)
  • The SYSTEM account needs to be able to run Powershell scripts
  • The existing Data Hub Agent is installed in its default location (if this isn't the case, either contact Raynet consulting or address the additional steps yourselves)
  • The existing "RayVentory Data Hub Agent" service is running as SYSTEM (if this isn't the case, either contact Raynet consulting or address the additional steps yourselves)
  • The "log4net.config" file is using its default configuration (if they do, either contact Raynet consulting or address the additional steps yourselves)
  • The "Raynet.RayVentory.DataHub.Agent.dll.config" file does not contain any custom settings (if they do, either contact Raynet consulting or address the additional steps yourselves)

 

Create UEM Packages

Microsoft .NET Core SDK Uninstall Tool x86

Create MSI package

Modify the installer commands

Install command

Add the following to the end of the existing install command line:  /qn /L*v C:\Windows\Temp\dotnetuninstaller_install.log

Uninstall command

Add the following to the end of the existing uninstall command line:  /qn /L*v C:\Windows\Temp\dotnetuninstaller_uninstall.log

 

Microsoft .NET 8.0.17 - Windows Server Hosting

Create EXE package

This example uses .Net 8.0.17; however, the latest version should always be used as the EXEs installation routine automatically downloads and installs the newest version, causing both versions to be listed within "Programs and Features".  

General tab

Replace /s with the following:  /install /quiet /norestart /log C:\Windows\Temp\dotnet8host_install.log

Enter the following for the uninstall command:  "$(ManageSoftPackage)/dotnet-hosting-8.0.17-win.exe" /uninstall /quiet /norestart /log C:\Windows\Temp\dotnet8host_uninstall.log

 

Detection tab

The following information was entered:  

The above values should be changed if a newer version of .Net 8.0 will be used.  

 

Create run commands

The priority is automatically set during creation but can be changed afterwards.  

  • cmd.exe /c "C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe" remove --hosting-bundle --all --yes --force --verbosity diag > C:\Windows\Temp\dotnetbundle_uninstall.log
  • cmd.exe /c "C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe" remove --runtime --all --yes --force --verbosity diag > C:\Windows\Temp\dotnetruntime_uninstall.log
  • cmd.exe /c "C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe" remove --aspnet-runtime --all --yes --force --verbosity diag > C:\Windows\Temp\dotnetaspnet_uninstall.log
  • cmd.exe /c "C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe" remove --sdk --all --yes --force --verbosity diag > C:\Windows\Temp\dotnetsdk_uninstall.log

 

Create dependency

 

Raynet One Data Hub Agent

Create MSI package

Select the relevant MST file

 

Modify the installer commands

 

Install command

Add the following to the end of the existing install command line: /qn APIKEY=XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX /L*v C:\Windows\Temp\dha_install.log

Eplace the Xs with your Data Hub's API key.  

Uninstall command

Add the following to the end of the existing uninstall command line: /qn /L*v C:\Windows\Temp\dha_uninstall.log

 

Create dependency

 

Testing

To test the process, target a device that needs to have its Data Hub Agent upgraded, by directly assigning the "Raynet One Data Hub Agent" package to it:  

 

Upgrade process

The next time the UEM managed device updates its policy, the following actions will be performed pertaining to those three UEM packages:  

  1. The installation agent will recognise that the "Raynet One Data Hub Agent" package requires the "Microsoft .NET 8.0.17 - Windows Server Hosting" package before it can be installed, and that that package requires the "Microsoft .NET Core SDK Uninstall Tool x86" package before it can be installed.  
  2. The "Microsoft .NET Core SDK Uninstall Tool x86" package will be downloaded and installed.  
  3. The "Microsoft .NET 8.0.17 - Windows Server Hosting" package will be downloaded, it's run commands will then remove existing .Net Core related components, and then the package will be installed.  
  4. The "Raynet One Data Hub Agent" package will be downloaded and installed.  Depending on which MST file was used, one or two "Raynet.RayVentory.DataHub.Agent.dll.config" file parameters will be set to true after the API key has been added to that file.  

Before example

 

After example

Comments

Powered by Zendesk