October 1, 2023
Azure Nedir Nasıl Çalışır

Start Azure Virtual Machine with Windows Powershell

Today i will explain to you how can you Start your Azure Virtual Machine with Powershell.

Sometimes we need to connect to azure vm without login to azure page. In this cases we can use powershell which is most stroing cli for Windows.

Before started to article. You need to know something. If you want to run command on Azure via on your computer that doesnt matter Windows, Mac or Linux you need to installed azure module on your powershell cmdlet.

If you dont have you can run and install Azure module to your computer

Start Azure Virtual Machine with Windows Powershell

Its not complicate the process so simple. You will just one simple comment to start your azure vm.

The comment explanation is below.

Start-AzVM -ResourceGroupName “myresource” -Name “vmname”

Thats the real example

When you run this command you can take an error like this;

Start-AzVM : No subscription found in the context. Please ensure that the credentials you provided are authorized to a
ccess an Azure subscription, then run Connect-AzAccount to login.
At line:1 char:1
+ Start-AzVM -ResourceGroupName “aliortultest” -Name “Aliwin11vm”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Start-AzVM], AzPSApplicationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.StartAzureVMCommand”

This error means you are not logged to Azure portal on your machine.
You can connect below command to your Azure Portal via Windows credential

If you wanna check to logged in to Azure use below command

Bir cevap yazın