PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Verify integrity of already installed resources

Open o-l-a-v opened this issue 1 year ago • 0 comments

Summary of the new feature / enhancement

Would be cool with the ability to verify the integrity of already installed resources, also if they aren't signed. As in, make sure no changes has been made to the <ModuleName>\<ModuleVersion> directory and all its' content.

Proposed technical implementation details (optional)

Cmdlet:

  • On scope: Verify-PSResource -Name '<name>' -Version '<version>' -Scope '<AllUsers|CurrentUser>'
  • With path: Verify-PSResource -Path 'C:\some\path\<ModuleName>\<ModuleVersion>'

Options/logic:

  • Create some comparison logic that checks that all files are present (and no other files are added) with correct checksum?
  • If any file is changed, added or is missing, nuke the directory and install it fresh with a switch -Remediate.
  • If no PS info XML file is found, require parameter -Repository to be specified in the cmdlet.

o-l-a-v avatar Apr 29 '24 11:04 o-l-a-v