How to find out what version of webdeploy/msdeploy is currently installed? How to find out what version of webdeploy/msdeploy is currently installed? powershell powershell

How to find out what version of webdeploy/msdeploy is currently installed?


When msdeploy is installed (no matter where in the file system), it will add its install path to the registry at;

HKLM\Software\Microsoft\IIS Extensions\MSDeploy\<version>\InstallPath

and its version information to;

HKLM\Software\Microsoft\IIS Extensions\MSDeploy\<version>\Version

...where <version> is currently 1, 2 or 3 depending on the WebDeploy version you have installed.


Depends on what you consider "version". By the folder name "c:\Program Files\IIS\Microsoft Web Deploy V3", the version is 3, but if you run msdeploy.exe, the version is 7.X


This is what I did in my PowerShell script:

$WebDeployInstalled = Get-WmiObject Win32_Product | ? {$_.Name -like '*Microsoft Web Deploy*'}if ($WebDeployInstalled -eq $null){    $msg = "Microsoft Web Deploy is not found on this machine."    Write-host -BackgroundColor Red -ForegroundColor White $msg    return}else{    $MSDeployPath = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\*" | Select-Object InstallPath    $MSDeployPath = $MSDeployPath.InstallPath}

HTH