A customer was building a SCCM package to update SCOM Agents. They needed the command lines to install and uninstall UR11.
Patch Install command
msiexec.exe /p "C:\temp\KB3183990-AMD64-Agent.msp" /qn
Patch Uninstall Command
msiexec /I {786970C5-E6F6-4A41-B238-AE25D4B91EEA} MSIPATCHREMOVE={1BEA7876-9751-4F7D-B0F3-AA920CF39FE8} /qn
The tricky part was getting the Uninstall GUID. You can get the GUID by using ORCA.
In ORCA load the msp file. Then go to View Summary Information.
They also needed a way to get the version information to know if it was installed or needed to be installed.
Here is a quick vbscript to get that information.
Set objShell = WScript.CreateObject("WScript.Shell") sngVersion = objShell.RegRead("HKLM\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup\InstallDirectory") Set objFSO = CreateObject("Scripting.FileSystemObject") fileVer = objFSO.GetFileVersion(sngVersion & "Tools\TMF\" & "OMAgentTraceTMFVer.Dll") If fileVer = "7.1.10285.0" Then Wscript.echo "UR11 Installed" Else Wscript.echo "Not Installed" End If
[…] Install and Uninstall SCOM 2012 R2 UR11 agents from a command line […]