PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

New-PSScriptFileInfo/Update-PSScriptFileInfo -RequiredModules could accept string collection

Open peetrike opened this issue 2 years ago • 0 comments

Summary of the new feature / enhancement

when adding Required Modules to script, both New-PSScriptFileInfo and Update-PSScriptFileInfo require module references to be hashtable. It would be much easier to add only module names as strings.

This is supported by PowerShellGet module cmdlets.

Proposed technical implementation details (optional)

This syntax is currently required by PSResourceGet

Update-PSScriptFileInfo -path test.ps1 -RequiredModules @{ModuleName='module1'}, @{ModuleName='module2'}

This is the way, how PowerShellGet allows it:

Update-ScriptFileInfo -path test.ps1 -RequiredModules module1, module2

peetrike avatar Jul 13 '23 11:07 peetrike