Skip to content

Bug: Unused Timeout parameter in Invoke-UpdateCheck remote scriptblock #5

@leonardokr

Description

@leonardokr

Description

In Invoke-WindowsUpdateMaintenance.ps1, the Invoke-UpdateCheck function passes $TimeoutMinutes as an ArgumentList to the remote scriptblock via Invoke-Command. However, the scriptblock declares a $Timeout parameter but never uses it.

Impact

The timeout value provided by the user has no effect on the remote update check operation.

Fix

Either:

  1. Use $Timeout inside the scriptblock to limit operation duration, or
  2. Remove it from both ArgumentList and the scriptblock param() if timeout control is not needed

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