PSDesiredStateConfiguration Module
PSDesiredStateConfiguration 模組支援 PowerShell 預期狀態設定 (PSDSC)。 此課程模組的每個主要版本都支援不同的使用案例:
- v1.1 僅支援 Windows PowerShell。 您可以使用它來叫用 PSDSC 資源,以及撰寫並套用 PSDSC 設定。
- v2 僅支援PowerShell。 您可以使用它來叫用 PSDSC 資源,以及編譯 PSDSC 組態。 其用途是支援 Azure 機器組態。
- v3 (預覽版) 僅支援 PowerShell。 您可以使用它來叫用 PSDSC 資源。 其用途是使用 Azure Machine Configuration 在 Linux 機器上叫用 PSDSC 資源。
Microsoft Desired State Configuration (DSC) 可讓您透過兩個配接器來管理 PSDSC 資源:
- 配
Microsoft.Windows/WindowsPowerShell接器可讓您在 Windows PowerShell 中使用 PSDesiredStateConfiguration 1.1 版來叫用任何 PSDSC 資源。 - 配接器
Microsoft.DSC/PowerShell可讓您在PowerShell中叫用任何以類別為基礎的 PSDSC 資源。 它不依賴 PSDesiredStateConfiguration 模組。
PSDesiredStateConfiguration 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. |