sefe / sefe/dorc

Some scripts fail in PS7

Open
#552 0 comments 0 reactions 2 assignees View on GitHub

@smurugan-sefe is already working on this.

Since May 11, 2026.

  • #558 by @smurugan-sefe — open
bug
Dominant language
C#
Stars
5
Forks
3
Avg merge
1d 22h
Merged PRs (30d)
14

Description

When running with PS7 in QA env controllservices.ps1 fails with following error (deployment ID - 1816135):
"[ERR] [PS] ErrorId: Microsoft.PowerShell.Commands.WriteErrorException,Get-DorcToken
Exception: Microsoft.PowerShell.Commands.WriteErrorException: Failed to retrieve token. Please check DorcIDSsecret variable value! Error: Unable to cast object of type 'System.Management.Automation.PSDataCollection1[System.Management.Automation.ProgressRecord]' to type 'System.Management.Automation.PSDataCollection1[System.Management.Automation.InformationRecord]'."

Based on my investigation the cause of the issue is following :
Wrong event wiring in DOrc.Cmd/dorc/src/Dorc.PowerShell/PowerShellScriptRunner.cs: Progress stream is subscribed to the Information handler.
Specifically line 61: powerShell.Streams.Progress.DataAdded += Powershell_Information_DataAdded;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.