在遠端機器上啟動 DSC(mof)

在遠端計算機上啟動 DSC 幾乎同樣簡單。假設你已經設定了 Powershell 遠端處理(或啟用了 WSMAN)。

$remoteComputer = "myserver.somedomain.com"
$cred = (Get-Credential)
Start-DSCConfiguration -ServerName $remoteComputer -Credential $cred -Verbose

Nb: 假設你已在 localmachine 上編譯了節點的配置(並且在開始配置之前存在 myserver.somedomain.com.mof 檔案)