Changed in D365FOD365FO

Start a cloud-hosted development VM from PowerShell

Wake up a cloud-hosted D365FO VM from the command line. The 2021 note used AzureRM; today the Az module replaces it.

AzureRM was deprecated on February 29, 2024: use Connect-AzAccount and Start-AzVM from the Az module.

First written
Re-read
Versions
D365FO

A cloud-hosted development VM is usually stopped to save cost, and starting it from the portal every morning is slow. This 2021 note starts it with two PowerShell commands.

In D365FO today

  • The AzureRM module used in the note is retired: “The AzureRM PowerShell module has been officially deprecated as of February 29, 2024”, and the Az module is the recommended replacement (AzureRM retirement overview). The same two steps use Connect-AzAccount and Start-AzVM:
Connect-AzAccount
Start-AzVM -ResourceGroupName "yourresourcegroupname" -Name "machineName"

The original note

The simplest way to wake up and start a cloud-hosted virtual machine from your command line.

The authentication method is an interactive login, but you can authenticate with another method, as described in the Connect-AzureRmAccount documentation.

  1. Run PowerShell.
  2. Run:
Connect-AzureRmAccount
Start-AzureRmVM -ResourceGroupName "yourresourcegroupname" -Name "maschineName"

More information is in the AzureRM.Compute module reference for AzureRM 6.13.0 (linked below).

References