You are planning to automate when an Azure Virtual Machine (Azure VM) named vm1 is turned on by using an Azure Runbook.
Vm1 is provisioned in a resource group named rg1. You write the runbook script as shown in the exhibit.
You need to run this runbook in your Azure subscription.
Which three actions should you perform in sequence?
You should perform the following actions in order:
1. Create an Azure Automation Account.
2. Import the necessary modules from the modules gallery.
3. Create a PowerShell runbook and execute the runbook.
You should create an Azure Automation Account. You can use the Azure Automation Account to manage your runbooks, configuration management, and authenticate your Azure subscription.
You should also import the necessary modules from the modules gallery. You need to import the Az.Accounts and the Az.Compute modules from the modules gallery. These modules are required by your runbook script, and they are not available by default when you create your Automation Account.
Finally, you should create a PowerShell runbook and execute the runbook. You need to create a PowerShell runbook to execute your script, and you can run your runbook to turn on the Azure VM.
You should not create a PowerShell Workflow runbook and execute the runbook. You can use a PowerShell Workflow runbook to support additional features to run your runbook, like checkpoints, parallel execution, and runspaces. The syntax of a PowerShell Workflow is slightly different than a PowerShell script.
You should not create a graphical runbook and execute the runbook. You can create a runbook by using a graphical interface to build your workflow. To create a graphical runbook from a script, you need to import from a PowerShell Workflow runbook.