Skip to content

Commit fc06a74

Browse files
Content update to 7 files and enhanced images
1 parent 4c21fa4 commit fc06a74

16 files changed

+238
-168
lines changed

articles/automation/automation-runbook-types.md

Lines changed: 75 additions & 29 deletions
Large diffs are not rendered by default.

articles/automation/learn/powershell-runbook-managed-identity.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create PowerShell runbook using managed identity in Azure Automation
2+
title: Create PowerShell Runbook Using Managed Identity in Azure Automation
33
description: In this tutorial, you learn how to use managed identities with a PowerShell runbook in Azure Automation.
44
services: automation
55
ms.subservice: process-automation
@@ -14,7 +14,7 @@ author: jasminemehndir
1414

1515
# Tutorial: Create Automation PowerShell runbook using managed identity
1616

17-
This tutorial walks you through creating a [PowerShell runbook](../automation-runbook-types.md#powershell-runbooks) in Azure Automation that uses a [managed identity](../automation-security-overview.md#managed-identities), rather than the Run As account to interact with resources. PowerShell runbooks are based on Windows PowerShell. A managed identity from Microsoft Entra ID allows your runbook to easily access other Microsoft Entra protected resources.
17+
This tutorial walks you through creating a [PowerShell runbook](../automation-runbook-types.md#powershell-runbooks) in Azure Automation that uses a [managed identity](../automation-security-overview.md#managed-identities) to interact with resources. PowerShell runbooks are based on Windows PowerShell. A managed identity from Microsoft Entra ID allows your runbook to easily access other Microsoft Entra protected resources.
1818

1919
In this tutorial, you learn how to:
2020

@@ -26,6 +26,8 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2626

2727
## Prerequisites
2828

29+
Before you assign permissions to managed identities, ensure you meet these prerequisites:
30+
2931
* An Azure Automation account with at least one user-assigned managed identity. For more information, see [Using a user-assigned managed identity for an Azure Automation account](../add-user-assigned-identity.md).
3032
* Az modules: `Az.Accounts`, `Az.Automation`, `Az.ManagedServiceIdentity`, and `Az.Compute` imported into the Automation account. For more information, see [Import Az modules](../shared-resources/modules.md#import-az-modules).
3133
* The [Azure Az PowerShell module](/powershell/azure/new-azureps-module-az) installed on your machine. To install or upgrade, see [How to install the Azure Az PowerShell module](/powershell/azure/install-azure-powershell). `Az.ManagedServiceIdentity` is a preview module and not installed as part of the Az module. To install it, run `Install-Module -Name Az.ManagedServiceIdentity`.
@@ -36,7 +38,9 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
3638

3739
Assign permissions to the managed identities to allow them to stop and start a virtual machine.
3840

39-
1. Sign in to Azure interactively using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet and follow the instructions.
41+
To assign permissions to managed identities, follow these steps:
42+
43+
1. Sign in to Azure interactively using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet and follow the instructions:
4044

4145
```powershell
4246
# Sign in to your Azure subscription
@@ -49,7 +53,7 @@ Assign permissions to the managed identities to allow them to stop and start a v
4953
# Select-AzSubscription -SubscriptionId <SUBSCRIPTIONID>
5054
```
5155
52-
1. Provide an appropriate value for the variables below and then execute the script.
56+
1. Enter an appropriate value for the variables below and then execute the script.
5357
5458
```powershell
5559
$resourceGroup = "resourceGroupName"
@@ -93,20 +97,24 @@ Assign permissions to the managed identities to allow them to stop and start a v
9397
9498
## Create PowerShell runbook
9599
96-
Create a runbook that will allow execution by either managed identity. The runbook will start a stopped VM, or stop a running VM.
100+
Create a runbook that will allow execution by either managed identity. The runbook will start a stopped VM or stop a running VM.
101+
102+
To create a PowerShell runbook, follow these steps:
97103
98104
1. Sign in to the [Azure portal](https://portal.azure.com/), and navigate to your Automation account.
99105
106+
1. In the **Overview** page, select **Try Runtime Environment experience**, if not already in the new experience .
107+
100108
1. Under **Process Automation**, select **Runbooks**.
101109
102-
1. Select **Create a runbook**.
110+
1. Select **Create a runbook** and do the following:
103111
104112
1. Name the runbook `miTesting`.
105113
1. From the **Runbook type** drop-down, select **PowerShell**.
106-
1. From the **Runtime version** drop-down, select either **7.1 (preview)** or **5.1**.
114+
1. From the **Runtime Environment** dropdown, **Select existing** Runtime environment or **Create new** with Runtime PowerShell and version 7.4.
107115
1. Enter an applicable **Description**.
108116
109-
1. Click **Create** to create the runbook.
117+
1. Select **Create** to create the runbook.
110118
111119
1. In the runbook editor, paste the following code:
112120

0 commit comments

Comments
 (0)