Share via


如何設定機器設定製作環境

PowerShell 模組 GuestConfiguration 會將建立自訂內容的流程自動化,包括:

  • 建立機器設定內容成品 (.zip)
  • 驗證套件是否符合需求
  • 在本機安裝電腦組態代理程式以進行測試
  • 驗證套件是否可以用來稽核電腦中的設定
  • 驗證套件是否可以用來設定電腦中的組態
  • 將套件發佈至 Azure 儲存體
  • 建立原則定義
  • 發佈原則

3.4.2 版中引進了透過機器設定套用設定的支援。

基本需求

可安裝模組的作業系統:

  • Ubuntu 18
  • Windows

模組可以安裝在執行 PowerShell 7 的電腦上。 為您的作業系統安裝下表所列的 PowerShell 版本。

OS PowerShell 版本
Windows PowerShell 7.1.3
Ubuntu 18 PowerShell 7.2.4

GuestConfiguration 模組需要下列軟體:

  • Azure PowerShell 5.9.0 或更新版本。 必要的 Az PowerShell 模組會自動隨 GuestConfiguration 模組一起安裝,或者您可以遵循這些指示

若要在 Windows 或 Linux 上安裝 GuestConfiguration 模組,請在 PowerShell 7 中執行下列命令。

# Install the machine configuration DSC resource module from PowerShell Gallery
Install-Module -Name GuestConfiguration

驗證已匯入模組:

# Get a list of commands for the imported GuestConfiguration module
Get-Command -Module 'GuestConfiguration'

後續步驟