slient upgrade RDM (Clientmanagement)

slient upgrade RDM (Clientmanagement)

avatar

Hello

Do you have a already existing script or an other way to upgrade RDM? The goal is to silent upgrade rdm on all my windows clients after upgrading the RDS.

Thx David

All Comments (7)

avatar

Hi David,

I'm currently in the process of integrating old scripts that will allow you to do just that.
I'll update this post once they are available.

Regards

Jonathan Lafontaine

avatar

hi Jonathan

Thx for this reply so far. Will this happen in the next year? I ask because, i need a solution within the next two weeks.
Maybe I can use the old Scrips? Will mean i don't need an out of the box solution.


avatar

Unfortunately, the old scripts were taken down as they relied on the old PowerShell module, which is not distributed anymore.

Hopefully, the ones I'm working on will be out before the next two weeks.

Jonathan Lafontaine

avatar

Could you inform me when you finished the script?

avatar

Hi,

Yes I will, absolutely.

Regards

Jonathan Lafontaine

avatar

Hello Jonathan

Is there a new script available now?
This would be great.

Regards
David

avatar

Hi,

The PowerShell still can't do it on its own, unfortunately.
However, I've reached around and found a script used internally that should do the same thing for the time being.

function Get-DevolutionsLinks {
    param (
        [Parameter(Mandatory)][string]$Pattern
    )
    $htm = (Invoke-WebRequest https://devolutions.net/products.htm -UseBasicParsing).Content
    $htmParsed = $htm -split "`n"
    $cdnUrl = $htmParsed | Select-String -Pattern $Pattern
    $cdnUrl.Line.SubString($cdnUrl.Line.IndexOf('=') + 1)
}


$RDMVersion = '2021.2.25.0'  #(Get-DevolutionsLinks -Pattern 'RDMWeb.Version').Trim() # Can be changed to request input for specific versions if ever
$RDMGAURl = "https://cdn.devolutions.net/download/Setup.RemoteDesktopManager.$RDMVersion.msi"
$RDMPath = 'C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager64.exe'

#region  Updating RDM GA Version
if (Test-Path -Path $RDMPath) { $RDMGAVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$RDMPath").FileVersion }
try {
    if (!(Test-Path -Path $RDMPath) -or (Compare-Object -ReferenceObject $RDMVersion -DifferenceObject $RDMGAVersion)) {
        #If GA version need to be updated
        Write-LogEvent -Message "Computer version is $RDMGAVersion and Network version is $RDMVersion"
        Write-LogEvent -Message 'RDM GA is out of date'

        #Download and Run MSI package for Automated install
        Start-BitsTransfer -Source $RDMGAURl -Destination $env:temp
        $RDMinstallFile = Get-ChildItem $env:temp\setup.Remo*.msi

        Start-Process -FilePath 'msiexec.exe' -ArgumentList "/I $RDMinstallFile /qn /norestart" -Wait

        Write-LogEvent -Message 'RDM GA has been successfully updated'
        Remove-Item $RDMinstallFile -Force
    } Else { Write-LogEvent -Message 'RDM GA is already up to date' }
} #Else GA version is uptodate
catch { Write-LogEvent -Message 'RDM GA, Failed operation' -Errors }


Let me know it this helps.
Regards

Jonathan Lafontaine