我正在尝试使用公开可用的ARM 模板添加 WinRs 支持
我收到以下错误
Changing property 'windowsConfiguration.winRM.listeners' is not allowed
然后我尝试使用本文最后提到的powershell脚本。我不确定是不是只有我觉得脚本有点错误,因为它不是很糟糕,所以我将其更改为如下
$vm = Get-AzureRmVM -ResourceGroupName "dscwitharm" -Name "dscwitharm"
$credential = Get-Credential
$secretURL = (Get-AzureKeyVaultSecret -VaultName "nithishvault" -Name "dscwitharmwinrs").Id
$vm = Set-AzureRmVMOperatingSystem -VM $vm -Windows -ComputerName "dscwitharm" -Credential $credential -WinRMHttps -WinRMCertificateUrl $secretURL
$sourceVaultId = (Get-AzureRmKeyVault -ResourceGroupName "dscwitharm" -VaultName "nithishvault").ResourceId
$CertificateStore = "My"
$vm = Add-AzureRmVMSecret -VM $vm -SourceVaultId $sourceVaultId -CertificateStore $CertificateStore -CertificateUrl $secretURL
Update-AzureRmVM -ResourceGroupName "dscwitharm" -VM $vm
我仍然得到同样的错误。我错过了什么?
> Changing property 'windowsConfiguration.winRM.listeners' is not allowed