-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Say, for instance, you are running:
- Windows 8.1
- Windows Management Framework Core 5.0 November 2014 Preview (PowerShell 5.0)
- Microsoft Azure PowerShell module version 0.8.13.
And you have the following configuration:
- You authenticate to Azure using the
Add-AzureAccountcommand from PowerShell, with the-Credentialparameter, using an Azure Active Directory (AAD) Organizational Account. - The account you authenticate to Azure with has co-administrator access to more than one Azure platform subscription.
- One of your two subscriptions has a cloud service with an Azure virtual machine provisioned, and running, inside of it.
Finally, you perform the following steps:
- You use the
Select-AzureSubscriptioncommand to select the Azure subscription that does not have the cloud service / virtual machine in it. - You call the
Stop-AzureVMorExport-AzureVMcommands against the cloud service / virtual machine. (eg.Stop-AzureVM -ServiceName mycloudsvc -Name vm01 -Force;) - No error / exception is thrown, and the command silently returns.
- You add the
-Verboseparameter to either command, and still, no output is emitted. - You somehow (magically) realize that you have the wrong subscription selected.
- You begin ripping your hair out.
- You select the correct Azure subscription and proceed normally.
Given the previous scenario, is it possible to thrown an exception when the specified cloud service / virtual machine is not found, for all of the VM-related commands? It seems like poor design to silently fail, without notifying the end user (me) what is [not] occurring in the background, and why, and how to resolve it.
Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
http://twitter.com/pcgeek86
http://trevorsullivan.net
Metadata
Metadata
Assignees
Labels
No labels