dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Update-DbaInstance fails when Kerberos Authentication and includeportinspn are used in 2.1.6

Open reshbuilds opened this issue 1 year ago • 1 comments

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

Update-DbaInstance fails when run against remote Sql Server 2022 servers which have HTTP SPN for WinRM. There are no issues with the network path mentioned as it works on all other instances of Update-DbaInstance (i.e., Sql 2022 servers without HTTP SPNs, Sql 2019/2017 servers).

VERBOSE: [15:08:55][Find-SqlInstanceUpdate] Using filter [SQLServer2022*-KB5032679-x64.exe] to check for updates in \home\win_Microsoft\SQLInstall\SQLCU WARNING: [15:08:56][Update-DbaInstance] Failed to enumerate files in -Path | Access is denied

Issue is related to a previous bug, which reappeared in the latest version 2.1.16 https://github.com/dataplat/dbatools/issues/7198

Steps to Reproduce

$serv = "SRVLAB02"
Set-DbaToolsConfig -Name 'psremoting.pssessionoption.includeportinspn' -Value $True
Update-DbaInstance -ComputerName $serv -version "2022SP0CU11" -Path $Patch_path -ExtractPath "C:\Temp" -Credential $UserCredential -Restart -Confirm:$true -Authentication Kerberos -Download -WhatIf -Verbose

Please confirm that you are running the most recent version of dbatools

2.1.6

Other details or mentions

No response

What PowerShell host was used when producing this error

VS Code (terminal)

PowerShell Host Version

Name Value


PSVersion 7.3.4 PSEdition Core GitCommitId 7.3.4 OS Microsoft Windows 10.0.19045 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM-CU10-GDR) (KB5033592) - 16.0.4100.1

.NET Framework Version

.NET 7.0.5

reshbuilds avatar Jan 16 '24 14:01 reshbuilds

Experiencing same issue where my Update-DbaInstance is failing on Find-SqlInstanceUpdate with Access Denied. I just tested with version 2.1.17 Also tried with the latest 2022 CU13 exe file saved locally on the machine. This was successful according to -WhatIf results.

geomaxson avatar Jun 18 '24 19:06 geomaxson