question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove unimplemented parameters from Set-AuthenticodeSignature

See original GitHub issue

Summary of the new feature/enhancement

Set-AuthenticodeSignature and Get-AuthenticodeSignature are both derived from the base class SignatureCommandsBase. The parameters are defined in the base class but implemented in the cmdlet class. Get-AuthenticodeSignature implements the SourcePathOrExtension and Content parameters, but Set-AuthenticodeSignature does not.

The problem is that Get-Command shows that parameters even though they are not implemented, causing confusion to the users and in the documentation.

Proposed technical implementation details (optional)

We have update the docs to explain that the parameters are not implemented.

The code should be changed. The parameters should be moved out of the base class and into the cmdlet class GetAuthenticodeSignatureCommand. That way, the parameters only apply to that cmdlet.

See related Docs issue https://github.com/MicrosoftDocs/PowerShell-Docs/issues/7564.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sdwheelercommented, May 17, 2021

I agree that it would be a breaking change. But I think it falls into the category of minimal risk and impact, since it was never implemented. We take changes like that all the time. Ultimately, it’s the committee’s decision.

1reaction
BrucePaycommented, May 15, 2021

@sdwheeler Even if a parameter does nothing, removing a parameter from a cmdlet is a breaking change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set-AuthenticodeSignature (Microsoft.PowerShell.Security)
The Set-AuthenticodeSignature cmdlet adds an Authenticode signature to any file that supports Subject Interface Package (SIP). In a PowerShell script file, ...
Read more >
powershell - How to properly re sign a shell script
Make sure to run Set-AuthenticodeSignature in an admin console. Start > powershell > right click > launch as administrator.
Read more >
Authenticode.psm1 2.6
In a Windows PowerShell script file, the signature takes the form of a block of text that indicates the end of the instructions...
Read more >
Removing Authenticode Signatures
What you would do if you had to remove authenticode signatures from multiple PowerShell scripts?
Read more >
Top 7 features you need to know about | Instant Windows ...
This command gets information about the Authenticode signature in the Export-NaEfficiencyXls.ps1 file. It uses the FilePath parameter to specify the file. Set- ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found