Skip to content

Bug: Recheck stage ignores SkipSQLServiceCheck parameter in Invoke-WindowsUpdateMaintenance.ps1 #4

@leonardokr

Description

@leonardokr

Description

In Invoke-WindowsUpdateMaintenance.ps1, the "Recheck" stage (Stage 3) hardcodes -SkipSQLCheck $false instead of passing through the value of the $SkipSQLServiceCheck parameter.

This means even if the user runs the script with -SkipSQLServiceCheck, the Recheck stage will still attempt SQL Server service verification.

Expected Behavior

The -SkipSQLServiceCheck switch should be respected across all stages, including Recheck.

Actual Behavior

Stage 1 (Check) respects the parameter, but Stage 3 (Recheck) always sets -SkipSQLCheck $false.

Fix

Change the hardcoded value to use the parameter:

-SkipSQLCheck $SkipSQLServiceCheck.IsPresent

Files Affected

  • Scripts/System/Invoke-WindowsUpdateMaintenance.ps1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions