Release: COM-handler StrictMode fix (dev -> main) #2

Merged
hannah-vernon merged 2 commits from dev into main 2026-06-30 16:39:43 -05:00

What does this PR do?

Promotes the current dev branch to main for release.

Included since the last main release:

  • Fix StrictMode error on COM-handler task actions in Get-GmsaScheduledTask.ps1 (#1).
    Scheduled Task actions can be MSFT_TaskExecAction (Execute / Arguments /
    WorkingDirectory) or MSFT_TaskComHandlerAction (ClassId / Data). The Actions block read
    .Execute unconditionally, so under Set-StrictMode -Version Latest any host with a
    COM-handler task threw "The property 'Execute' cannot be found on this object." A
    StrictMode-safe property accessor now probes before reading, and the output reports
    ActionType plus ComClassId / ComData.

Fixes #

How was this tested?

  • Parser validation - 0 errors for every changed .ps1 file
  • Manually tested on a host with 230 tasks, 114 of which use COM-handler actions: all
    report without error.

Checklist

  • I have read the Contributing Guide
  • Changes are focused - one logical change per PR
  • Comment-based help updated for any changed parameters or behavior
  • Documentation updated (if user-visible behavior changed)
  • No commented-out code or debug leftovers
## What does this PR do? Promotes the current `dev` branch to `main` for release. Included since the last `main` release: - **Fix StrictMode error on COM-handler task actions in `Get-GmsaScheduledTask.ps1`** (#1). Scheduled Task actions can be `MSFT_TaskExecAction` (Execute / Arguments / WorkingDirectory) or `MSFT_TaskComHandlerAction` (ClassId / Data). The Actions block read `.Execute` unconditionally, so under `Set-StrictMode -Version Latest` any host with a COM-handler task threw "The property 'Execute' cannot be found on this object." A StrictMode-safe property accessor now probes before reading, and the output reports `ActionType` plus `ComClassId` / `ComData`. Fixes # ## How was this tested? - [x] Parser validation - 0 errors for every changed `.ps1` file - [x] Manually tested on a host with 230 tasks, 114 of which use COM-handler actions: all report without error. ## Checklist - [x] I have read the [Contributing Guide](../CONTRIBUTING.md) - [x] Changes are focused - one logical change per PR - [x] Comment-based help updated for any changed parameters or behavior - [x] Documentation updated (if user-visible behavior changed) - [x] No commented-out code or debug leftovers
Get-ScheduledTask actions can be MSFT_TaskExecAction (Execute/Arguments/
WorkingDirectory) or MSFT_TaskComHandlerAction (ClassId/Data). The Actions block
read .Execute unconditionally, so under Set-StrictMode -Version Latest a task with
a COM-handler action threw 'The property Execute cannot be found on this object.'

Add a StrictMode-safe Get-CimPropertyValue helper that probes PSObject.Properties,
and report ActionType plus ComClassId/ComData alongside the exec fields. Verified
against a host with 114 COM-handler tasks: all now report without error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reviewed-on: #1
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hannah-vernon/GmsaScheduledTaskTools!2
No description provided.