【发布时间】:2014-06-10 23:00:36
【问题描述】:
我正在尝试使用以下脚本设置 VM 的 IP。但是它返回了这个我无法解决的神秘错误。
$cloudSvcName = "My-SPService";
Test-AzureStaticVNetIP –VNetName My-SPNetwork –IPAddress 10.0.0.4
$dns = Get-AzureVM -Name "My-DNS" -ServiceName $cloudSvcName ;
stop-AzureVM -Name $dns.Name -ServiceName $cloudSvcName -Force;
set-AzureStaticVNetIP -VM $dns -IPAddress 10.0.0.4 | update-AzureVM;
这是错误:
[ERROR] update-AzureVM : BadRequest: The value for parameter 'SubnetNames' is null or empty.
[ERROR] At C:\Users\Tim\Source\Repos\Powershell Azure\AzurePowerShell\ScratchPad.ps1:12 char:104
[ERROR] + ... ess 10.0.0.4 | update-AzureVM -ServiceName $cloudSvcName;
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : CloseError: (:) [Update-AzureVM], CloudException
[ERROR] + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.UpdateAzureVMCommand
【问题讨论】:
标签: powershell azure