Skip to main content
powershell/PSDSCUseVerboseMessageInDSCResource is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
tally disables this rule by default because Desired State Configuration resources are out of scope for Dockerfile RUN analysis. Re-enable it with include = ["powershell/PSDSCUseVerboseMessageInDSCResource"] or by setting rules.powershell.PSDSCUseVerboseMessageInDSCResource.severity = "warning" in .tally.toml.

Description

Best practice recommends that additional user information is provided within commands, functions and scripts using Write-Verbose.

How

Make use of the Write-Verbose command.

Examples

Problematic code

Correct code

Source

This rule documentation is adapted from Microsoft’s PSScriptAnalyzer documentation for DSCUseVerboseMessageInDSCResource, licensed under CC BY 4.0.