New-DSCCheckSum

Creates checksum files for DSC documents and DSC resources.
New-DSCCheckSum [-Path*] <String[]> [[-OutPath] [<String>]] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

The New-DSCCheckSum cmdlet generates checksum files for Windows PowerShell Desired State Configuration (DSC) documents and compressed DSC resources. This cmdlet generates a checksum file for each configuration and resource to be used in pull mode. The DSC service uses the checksums to make sure that the correct configuration and resources exist on the target node. Place the checksums together with the associated DSC documents and compressed DSC resources in the DSC service store.

Parameters
-Force [<SwitchParameter>]

Indicates that the cmdlet overwrites the specified output file if it already exists.

-OutPath [<String>]

Specifies the path and file name of the output checksum file.

-Path <String[]>

  • This value is required

Specifies the path of the input file.

-Confirm [<SwitchParameter>]

  • Default value is false

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

-WhatIf [<SwitchParameter>]

  • Default value is false

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Examples
  1. Create checksum files for all configurations in a specific path:
    PS C:>  New-DscCheckSum -Path "C:DSCConfigurations"
    

    This command creates checksum files for all configurations in the path C:DSCConfigurations. Any checksum files that already exist are skipped.

  2. Create checksum files for all configurations in a specific path and overwrite the existing checksum:
    
       files
    
    PS C:>  New-DscCheckSum -Path "C:DSCConfigurations" -Force
    

    This command creates new checksum files for all configurations in the path C:DSCConfigurations. Specifying the Force parameter causes the command to overwrite any checksum files that already exist.