如何使用powershell在经典云服务状态中获取状态设置-azure角色

问题描述

今天的问候!!!

我正在使用 powershell 在经典云服务中添加新用户角色,但我无法跟踪状态是成功还是失败。 如果成功,我需要实现一些其他功能 有人可以帮忙吗。

以下是我正在尝试的功能

Set-AzureRole -ServiceName $resourceGroup -RoleName $userRole -Slot 'Production' -Count $count

#Write-Host“现在运行状态”$_.OperationStatus

if(!$_.OperationStatus)
            {
            $userRole=rolename
                Write-Host "Successfully updated instances count for $userRole $resourceGroup" -ForegroundColor Green

                    Write-Host "Current Status After Update :" -ForegroundColor Yellow 
                        
                        $details=Get-AzureRole -ServiceName $resourceGroup -Slot "Production" -RoleName $userRole

                             Write-Host $details    

}

如何追踪

非常感谢您的帮助

提前致谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)