-
Notifications
You must be signed in to change notification settings - Fork 1
Get‑ModuleFileSha
Retrieves the SHA256 hash of all ps1, psm1, and psd1 files in a PowerShell module.
Get-ModuleFileSha -Name <String> [-Version <String>] [<CommonParameters>]
Get-ModuleFileSha -Path <String> [<CommonParameters>]
The Get-ModuleFileSha function retrieves the SHA256 hash of all ps1, psm1, and psd1 files in a PowerShell module. It takes a module name, module version, and Path as parameters. The function loops through all the ps1, psm1, and psd1 files that the module consists of and outputs each file with its corresponding SHA using the SHA256 algorithm.
Get-ModuleFileSha -Name 'MyModule' -Version '1.0.0'
Retrieves the SHA256 hash of all ps1, psm1, and psd1 files in the 'MyModule' module with version '1.0.0'.
Get-ModuleFileSha -Path 'C:\Modules\MyModule\1.0.0'
Retrieves the SHA256 hash of all ps1, psm1, and psd1 files in the module located at 'C:\Modules\MyModule'.
Specifies the name of the module.
Type: String
Parameter Sets: ModuleName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the path to the root of module for a specific version.
Type: String
Parameter Sets: Path
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the version of the module.
Type: String
Parameter Sets: ModuleName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Assert-GitLocalChange
- Assert-GitRemote
- Assert-IPv4Address
- Clear-AnsiSequence
- ConvertTo-AnsiSequence
- ConvertTo-AnsiString
- ConvertTo-DifferenceString
- ConvertTo-RelativePath
- Disable-CursorShortcutCode
- Get-ClassAst
- Get-ClassResourceAst
- Get-GitBranchCommit
- Get-GitLocalBranchName
- Get-GitRemote
- Get-GitRemoteBranch
- Get-GitTag
- Get-LinkLayerAddress
- Get-ModuleByVersion
- Get-ModuleFileSha
- Get-ModuleVersion
- Get-NumericalSequence
- Get-PSReadLineHistory
- Get-TextOffset
- Install-ModulePatch
- Invoke-Git
- Invoke-PesterJob
- New-GitTag
- New-SamplerGitHubReleaseTag
- Out-Difference
- Pop-VMLatestSnapshot
- Push-GitTag
- Receive-GitBranch
- Remove-GitTag
- Remove-History
- Remove-PSHistory
- Remove-PSReadLineHistory
- Rename-GitLocalBranch
- Rename-GitRemote
- Request-GitTag
- Resolve-DnsName
- Resume-GitRebase
- Send-WakeOnLan
- Split-StringAtIndex
- Start-GitRebase
- Stop-GitRebase
- Switch-GitLocalBranch
- Test-FileHash
- Test-GitLocalChanges
- Test-GitRemote
- Test-GitRemoteBranch
- Test-IPv4Address
- Update-GitLocalBranch
- Update-RemoteTrackingBranch