我试图了解如何使用 powershell 命令
New-AzCloudService
部署 Azure 云服务(扩展支持)。
我已经使用 Visual Studio 部署了云服务,一切都很顺利,但是当我尝试使用以下命令部署它时
New-AzCloudService
-Name $ServiceName
-ResourceGroupName $ResourceGroupName
-Location $Location
-ConfigurationFile $CscfgFilePath
-DefinitionFile $CsdefFilePath
-PackageFile $CspkgFilePath
-StorageAccount $StorageAccount
我收到以下错误:
A Cloud Service resource with name: <service_name> already exists in Resource Group:
<resource_group_name>. Please try another name.
查看
New-AzCloudService
文档这里,它指出:Create or update a cloud service
。
我做错了什么?
因为您已经部署了云服务,因此在资源组中使用相同的名称。 您需要删除现有的云服务或更改其他云服务名称