如何通过PowerShell启用BGINFO扩展? [英] How do I enable the BGINFO extension via powershell?
问题描述
写主机在< VMNAME>上启用BGInfo
Set-AzureRmVMBginfoExtension -Name BGInfo -vmname< VMNAME> -ResourceGroupName< RESOURCEGROUP> -TypeHandlerVersion
2.1 -Location eastus
< VMNAME>由实际VMName替换
< RESOURGEGROUP>由VM所在的资源组取代
根据文档,这应该有效。
不是。
如何重新加/修这个?
I am使用此命令:
VM
= Get-AzureRmVM -ResourceGroupName iidrtest rg -Name< VMNAME> ;
VM
-Enable -ResourceGroupName cloud-shell-storage-eastus -StorageAccountName< STORAGEACCOUNTNAME>
< VMNAME>由我在azure中的实际VM名称替换
< STORAGEACCOUNTNAME>被实际的storageaccount名称取代
跨度>
Write-host Enabling BGInfo on <VMNAME>
Set-AzureRmVMBginfoExtension -Name BGInfo -vmname <VMNAME> -ResourceGroupName <RESOURCEGROUP> -TypeHandlerVersion 2.1 -Location eastus
<VMNAME> is replaced by actual VMName
<RESOURGEGROUP> is replaced by the resourcegroup the VM is in
According to the documentation, this should work.
It isn't.
How can I reoubleshoot/fix this?
I am using this command:
VM = Get-AzureRmVM -ResourceGroupName iidrtestrg -Name <VMNAME> ;
VM -Enable -ResourceGroupName cloud-shell-storage-eastus -StorageAccountName <STORAGEACCOUNTNAME><VMNAME> is replaced by my actual VM name in azure
<STORAGEACCOUNTNAME> is replaced by the actual storageaccount name
这篇关于如何通过PowerShell启用BGINFO扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!