In my subscription I have a number of cloud services, a few of them don't have a deployment (just empty services).
If I try to collect info about the cloud service roles, even using -ErrorAction SilentlyContinue to not be blocked by the empty deployments, I still get a terminating error:
In my subscription I have a number of cloud services, a few of them don't have a deployment (just empty services). If I try to collect info about the cloud service roles, even using -ErrorAction SilentlyContinue to not be blocked by the empty deployments, I still get a terminating error:
Get-AzureService | Get-AzureRole -ErrorAction SilentlyContinue
RoleName : EventSourceInfo.WebService InstanceCount : 2 DeploymentID :
ServiceName :
OperationDescription : Get-AzureRole
OperationId :
OperationStatus : Succeeded
Get-AzureRole : ResourceNotFound: No deployments were found. At line:1 char:20
Anyway if I use Get-AzureDeployment everything works as expected:
Get-AzureService | Get-AzureDeployment -ErrorAction SilentlyContinue | select DeploymentName
DeploymentName
deployment 1 deployment 2