Search code examples
azureazure-cloud-shell

Azure Cloud Shell - The term 'Stop-AzureVM' is not recognized


I am attempting to use the Azure Cloud Shell (browser based) to manage a classic VM. When I run this command:

Stop-AzureVM -ResourceGroupName <resourceGroup> -Name <vmName>

I get this error:

Stop-AzureVM : The term 'Stop-AzureVM' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of 
the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Stop-AzureVM -ResourceGroupName <resourceGroup>-Name <vmName>
+ ~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Stop-AzureVM:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Am I doing anything wrong, or is this just not supported in Cloud Shell?


Solution

  • but that gives me Unable to load DLL 'IEFRAME.dll'

    Azure cloud shell does not support use another account to login it.

    Cloud Shell also securely authenticates automatically for instant access to your resources through the Azure CLI 2.0 or Azure PowerShell cmdlets.

    As a workaround, maybe you can use cloud shell bash to stop that VM(classic).

    Azure CLI 1.0 support ASM and ARM, just change mode to ASM, you can use cloud shell to manage your classic VM, like this:

    azure config mode asm
    azure vm list
    azure vm --help  //get more information about CLI 1.0
    

    enter image description here

    Hope this helps.