PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Update-PSScriptFileInfo and Update-ModuleManifest Verbs

Open ThomasNieto opened this issue 3 years ago • 1 comments

Summary of the new feature / enhancement

Update-PSScriptFileInfo and Update-ModuleManifest both use the Update verb but the proper verb should be Set. The PowerShell Verbs documentation have the following definitions.

Update

Brings a resource up-to-date to maintain its state, accuracy, conformance, or compliance.

Set

Replaces data on an existing resource or creates a resource that contains some data.

These two cmdlets set data on a resource in this case the script file info and module manifest respectively. They do not change state of a resource as update is intended for. Update-PSResource is a good example of the proper use of the update verb since it changes the state of the machine to bring it up-to-date. An alias can be added to CompatPowerShellGet to avoid breaking changes.

Proposed technical implementation details (optional)

No response

ThomasNieto avatar Aug 16 '22 21:08 ThomasNieto

Thanks Thomas, curious if @JamesWTruher has a perspective on this one

SydneyhSmith avatar Aug 18 '22 18:08 SydneyhSmith