PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Add Get-PSScriptFileInfo cmdlet

Open ThomasNieto opened this issue 3 years ago • 3 comments

Summary of the new feature / enhancement

As a user I want a Get-PSScriptFileInfo cmdlet to return a PSScriptFileInfo object from a specified script. This functionality was present in PowerShellGet v2 using the Test-ScriptFileInfo cmdlet.

Proposed technical implementation details (optional)

No response

ThomasNieto avatar Aug 15 '22 20:08 ThomasNieto

What if we added -PassThru on Test-ScriptFileInfo? We can have discussions on keeping this as default behavior for Test-ScriptFileInfo as well.

alerickson avatar Aug 17 '22 00:08 alerickson

I'd be fine with changing the default behavior for Test-ScriptFileInfo to return an object of the script info metadata. Then no -PassThru flag is needed or a new cmdlet. It also matches the behavior of Test-ModuleManifest.

ThomasNieto avatar Aug 17 '22 19:08 ThomasNieto

After some discussion, we determined that a Get-PSScriptFileInfo cmdlet is the best option this cmdlet would take a -Path parameter

SydneyhSmith avatar Aug 23 '22 18:08 SydneyhSmith