Is it possible to have the tentacle health check (or a deployment step) test for the currently installed .Net version? The same would apply for IIS version number. It wasted a lot of time today to see that my server upgrade exe powershell script failed with error code -2146232576 (very helpful error code) on one tentacle. After adding this bit of powershell it gave me a build number which I could then derive on MSDN to be Net version 4.5.1 (rather than the 4.5.2 wich was needed).
So now at least I have the .Net build numbers in my logfile as reference in the log if it fails. However, do feel that this could be made easier/automatic. So is there a way to check the the tentacle environment .Net version which I’ve missed? I’m fairly new to Octopus and not very skilled in powershell (the ps script above is not my own ;-).
Thanks for reaching out. The only way to get this would be using a script. I’ve gathered the first results I could find on google and made this snippet for you:
function Get-DotNETVersions{
$dotnetversions = Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 | Where { $_.PSChildName -match '^(?!S)\p{L}'} | Select PSChildName, Version, Release
$dotnetversions
}
Function Get-IISVersion{
$iisversion = get-itemproperty HKLM:\SOFTWARE\Microsoft\InetStp\ | select -ExpandProperty versionstring
$iisversion
}
Write-output "IIS version installed on $($env:COMPUTERNAME): " (Get-IISVersion)
Write-Output ".NET versions installed on $($env:COMPUTERNAME): "
Get-DotNETVersions
Thanks for that bit of poweshell script Dalmiro, it clearly lists the .net version number and installed IIS version which is helpful. I gather that there is no way in which we could incorporate this bit of script in the health check of each tentacle though? Could envisage that you would want to monitor certain key aspects of your remote machines, and if we could plug in scripts like this then we could write our own additions. That might be more of a change request though. Will experiment a bit more with powershell, which might be worth learning after all