Dela via


PSDesiredStateConfiguration Module

Modulen PSDesiredStateConfiguration stöder PowerShell Desired State Configuration (PSDSC). Varje huvudversion av den här modulen stöder olika användningsfall:

  • v1.1 stöds endast för Windows PowerShell. Du kan använda den för att anropa PSDSC-resurser och för att skapa och tillämpa PSDSC-konfigurationer.
  • v2 stöds endast för PowerShell. Du kan använda den för att anropa PSDSC-resurser och kompilera PSDSC-konfigurationer. Den är avsedd att användas för att stödja Azure Machine Configuration.
  • v3 (förhandsversion) stöds endast för PowerShell. Du kan använda den för att anropa PSDSC-resurser. Den är avsedd att användas för att anropa PSDSC-resurser på Linux-datorer med Azure Machine Configuration.

Med Microsoft Desired State Configuration (DSC) kan du hantera PSDSC-resurser via två kort:

  • Med Microsoft.Windows/WindowsPowerShell adaptern kan du anropa alla PSDSC-resurser som kan användas med PSDesiredStateConfiguration version 1.1 i Windows PowerShell.
  • Med Microsoft.DSC/PowerShell adaptern kan du anropa alla klassbaserade PSDSC-resurser i PowerShell. Den förlitar sig inte på modulen PSDesiredStateConfiguration .

PSDesiredStateConfiguration Cmdlets

Cmdlet Description
Get-DscResource

Gets Desired State Configuration (DSC) resources present on the computer.

Invoke-DscResource

Runs a method of a specified PowerShell Desired State Configuration (DSC) resource.

New-DscChecksum

Creates checksum files for DSC documents and DSC resources.