# Update existing Cisco Jabber clients to latest version using GPO without need for local user admin rights # Initial installations of Cisco Jabber manually by IT Helpdesk only # Original release: 10-March-2020 by Matthias Schwarz # Last revision on: 06-April-2020 by Matthias Schwarz # Populate static variables for this script ----------------------------------------------------------------------------------- $AppDir = '\\\public\Software\Cisco\Jabber' $AppFile = 'CiscoJabberSetup.msi' $Application = "$AppDir\$AppFile" $AppArgs = 'CLEAR=1 LANGUAGE=1033 AUTOMATIC_SIGN_IN=true RESET_JABBER=1' # no need to Orca transform the original MSI $AppName = 'Cisco Jabber' $AppVersion = (Select-String -Path "$AppDir\README_install.txt" -Pattern 'Contains MSI for Build Number' | Out-String -Width 120).Substring(106,12) # Adust pattern/substring if Cisco changes layout of README file # Check if any version of Jabber is installed --------------------------------------------------------------------------------- $RegPath = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') $InstalledApps = Get-ItemProperty $RegPath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ }}} | Select-Object DisplayName, Publisher, InstallDate, DisplayVersion, UninstallString | Sort DisplayName If($InstalledApps | Where-Object {$_.DisplayName -eq $AppName -and $_.DisplayVersion -eq $AppVersion}){ $AppStatus = 'Up To Date' Exit # nothing to do, already up to date } ElseIf($InstalledApps | where {$_.DisplayName -eq $AppName -and $_.DisplayVersion -ne $AppVersion}){ $AppStatus = 'Older Version' # need to update client software, so script continues } Else{ $AppStatus = "Not Installed" Exit # could instead delete "Exit" and allow script to continue if first install is desired } # Install latest version of Jabber if desired --------------------------------------------------------------------------------- <# Begin code used to encrypt domain admin password with key for all machines and users *************************************** Run this code section separately just once! $KeyFile = "\\\public\Software\Cisco\Jabber\AES.key" $Key = New-Object Byte[] 32 # You can use 16, 24, or 32 for AES [Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key) $Key | out-file $KeyFile $PasswordFile = "\\\public\Software\Cisco\Jabber\adminpwd.txt" $Key = Get-Content $KeyFile $Password = "" | ConvertTo-SecureString -AsPlainText -Force # this is the password for the $Password | ConvertFrom-SecureString -key $Key | Out-File $PasswordFile # admin account on line 58 end code used to encrypt admin password with key for all machines and users *************************************************#> $User = "\" # replace with the admin account you want to use $PasswordFile = "\\\public\Software\Cisco\Jabber\adminpwd.txt" $KeyFile = "\\\public\Software\Cisco\Jabber\AES.key" $Key = Get-Content $KeyFile $AdminCred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, (Get-Content $PasswordFile | ConvertTo-SecureString -Key $Key) # Ready to start installation ------------------------------------------------------------------------------------------------- Start-Process "msiexec" -Credential $AdminCred -ArgumentList "/i $($Application) $($AppArgs) /passive /norestart"