Pattern: Missing use of Write-Verbose
in DSC function
Issue: -
It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed.
Make use of the Write-Verbose
command.
Example of incorrect code:
Function Test-Function
{
[CmdletBinding()]
Param()
...
}
Example of correct code:
Function Test-Function
{
[CmdletBinding()]
Param()
Write-Verbose "Verbose output"
...
}