acasilla / SPFarmInfo

Collect Information from SharePoint Farms
13 stars 8 forks source link

Side by Side Patching false positive #12

Open ChristophHannappel opened 8 months ago

ChristophHannappel commented 8 months ago

Hello,

i just ran the January 2024 Version of SPFarmInfo and got a Cirtical Warning "SideBySideToken is not the current farm build".

EnabledSideBySide: True SideBySideToken: 16.0.16731.20462 FarmBuildToken: 16.0.16731.20452 SideBySideTokenMatchesFarmBuild: False

The codes uses the Local Build Version $farmBuild = [Microsoft.SharePoint.Administration.SPFarm]::Local.BuildVersion which seams to only reflects the Config DB Version. But with the December CU the Config DB has an older Build Version than the rest of the components.

Maybe the Product Group is willing to create a reliable API, since parsing the Central Administration might be a bit annoying :) SharePoint does not have a build version. Full Stop.. We used the following script to determine the current Buildversion for our automation process

$templatePath = Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Microsoft\Office Server\16.0' -Name 'TemplatePath'
$layoutsPath = Join-Path -Path $templatePath -ChildPath 'LAYOUTS'
if (Test-Path -Path $layoutsPath -PathType Container)
{
    [system.version]$version = Get-ChildItem -Path $layoutsPath -Directory  -Filter '16.0.*'| Sort-Object -Property Name | Select-Object -ExpandProperty Name -Last 1
}

The Warning should come with a disclaimer for false poistives.

joeric2 commented 3 months ago

We'll look into this and address it an upcoming release.