You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Once inside the "Create an Automation Account" pane, click on "**Create**"
43
-
- Populate the required information: enter a name for this automation account, select your Azure subscription ID and Azure resources to be used for the PowerShell script execution
44
-
- For the "**Create Azure Run As account**" option, select **Yes** to configure the type of account under which PowerShell script runs with the help of Azure Automation. To learn more about account types, see [Run As account](https://docs.microsoft.com/azure/automation/automation-create-runas-account)
45
-
- Conclude creation of the automation account by clicking on **Create**
42
+
1. Once inside the "Create an Automation Account" pane, click on "**Create**".
43
+
1. Populate the required information: enter a name for this automation account, select your Azure subscription ID and Azure resources to be used for the PowerShell script execution.
44
+
1. For the "**Create Azure Run As account**" option, select **Yes** to configure the type of account under which PowerShell script runs with the help of Azure Automation. To learn more about account types, see [Run As account](https://docs.microsoft.com/azure/automation/automation-create-runas-account).
45
+
1. Conclude creation of the automation account by clicking on **Create**.
46
46
47
47
> [!TIP]
48
48
> Record your Azure Automation account name, subscription ID, and resources (such as copy-paste to a notepad) exactly as entered while creating the Automation app. You need this information later.
@@ -62,18 +62,18 @@ The next step is to create a Runbook in Azure Automation inside which the PowerS
62
62
63
63
Follow these steps to create a new Azure Automation runbook:
64
64
65
-
- Access the Azure Automation account you created in the previous step
66
-
- Once in the automation account pane, click on the "**Runbooks**" menu item on the left-hand side to create a new Azure Automation runbook with the PowerShell script. To learn more about creating automation runbooks, see [Creating a new runbook](../automation/manage-runbooks.md#creating-a-runbook).
67
-
- To add a new runbook, click on the "**+Add a runbook**" menu option, and then click on the "**Quick create – Create a new runbook**".
68
-
- In the Runbook pane, type in the name of your runbook (for the purpose of this example, "**AutomaticTuningEmailAutomation**" is used), select the type of runbook as **PowerShell** and write a description of this runbook to describe its purpose.
69
-
- Click on the **Create** button to finish creating a new runbook
65
+
1. Access the Azure Automation account you created in the previous step.
66
+
1. Once in the automation account pane, click on the "**Runbooks**" menu item on the left-hand side to create a new Azure Automation runbook with the PowerShell script. To learn more about creating automation runbooks, see [Creating a new runbook](../automation/manage-runbooks.md#creating-a-runbook).
67
+
1. To add a new runbook, click on the "**+Add a runbook**" menu option, and then click on the "**Quick create – Create a new runbook**"..
68
+
1. In the Runbook pane, type in the name of your runbook (for the purpose of this example, "**AutomaticTuningEmailAutomation**" is used), select the type of runbook as **PowerShell** and write a description of this runbook to describe its purpose.
69
+
1. Click on the **Create** button to finish creating a new runbook.
Follow these steps to load a PowerShell script inside the runbook created:
74
74
75
-
- Inside the "**Edit PowerShell Runbook**" pane, select "**RUNBOOKS**" on the menu tree and expand the view until you see the name of your runbook (in this example "**AutomaticTuningEmailAutomation**"). Select this runbook.
76
-
- On the first line of the "Edit PowerShell Runbook" (starting with the number 1), copy-paste the following PowerShell script code. This PowerShell script is provided as-is to get you started. Modify the script to suite your needs.
75
+
1. Inside the "**Edit PowerShell Runbook**" pane, select "**RUNBOOKS**" on the menu tree and expand the view until you see the name of your runbook (in this example "**AutomaticTuningEmailAutomation**"). Select this runbook.
76
+
1. On the first line of the "Edit PowerShell Runbook" (starting with the number 1), copy-paste the following PowerShell script code. This PowerShell script is provided as-is to get you started. Modify the script to suite your needs.
77
77
78
78
In the header of the provided PowerShell script, you need to replace `<SUBSCRIPTION_ID_WITH_DATABASES>` with your Azure subscription ID. To learn how to retrieve your Azure subscription ID, see [Getting your Azure Subscription GUID](https://blogs.msdn.microsoft.com/mschray/20../../getting-your-azure-subscription-guid-new-portal/).
79
79
@@ -178,45 +178,45 @@ With the above steps, the PowerShell script to retrieve Automatic tuning recomme
178
178
179
179
To complete the solution, as the final step, create an automation flow in Microsoft Flow consisting of three actions (jobs):
180
180
181
-
1. "**Azure Automation - Create job**" – used to execute the PowerShell script to retrieve Automatic tuning recommendations inside the Azure Automation runbook
182
-
2. "**Azure Automation - Get job output**" – used to retrieve output from the executed PowerShell script
181
+
1. "**Azure Automation - Create job**" – used to execute the PowerShell script to retrieve Automatic tuning recommendations inside the Azure Automation runbook.
182
+
2. "**Azure Automation - Get job output**" – used to retrieve output from the executed PowerShell script.
183
183
3. "**Office 365 Outlook – Send an email**" – used to send out email. E-mails are sent out using the Office 365 account of the individual creating the flow.
184
184
185
185
To learn more about Microsoft Flow capabilities, see [Getting started with Microsoft Flow](https://docs.microsoft.com/flow/getting-started).
186
186
187
187
Prerequisite for this step is to sign up for [Microsoft Flow](https://flow.microsoft.com) account and to log in. Once inside the solution, follow these steps to set up a **new flow**:
188
188
189
-
- Access "**My flows**" menu item
190
-
- Inside My flows, select the "**+Create from blank**" link at the top of the page
191
-
- Click on the link "**Search for hundreds of connectors and triggers**" at the bottom of the page
192
-
- In the search field type "**recurrence**", and select "**Schedule - Recurrence**" from the search results to schedule the email delivery job to run.
193
-
- In the Recurrence pane in the Frequency field, select the scheduling frequency for this flow to execute, such as send automated email each Minute, Hour, Day, Week, etc.
189
+
1. Access "**My flows**" menu item.
190
+
1. Inside My flows, select the "**+Create from blank**" link at the top of the page.
191
+
1. Click on the link "**Search for hundreds of connectors and triggers**" at the bottom of the page.
192
+
1. In the search field type "**recurrence**", and select "**Schedule - Recurrence**" from the search results to schedule the email delivery job to run.
193
+
1. In the Recurrence pane in the Frequency field, select the scheduling frequency for this flow to execute, such as send automated email each Minute, Hour, Day, Week, etc.
194
194
195
195
The next step is to add three jobs (create, get output and send email) to the newly created recurring flow. To accomplish adding the required jobs to the flow, follow these steps:
196
196
197
197
1. Create action to execute PowerShell script to retrieve tuning recommendations
198
198
199
-
- Select "**+New step**", followed by "**Add an action**" inside the Recurrence flow pane
200
-
- In the search field type "**automation**" and select "**Azure Automation – Create job**" from the search results
199
+
- Select "**+New step**", followed by "**Add an action**" inside the Recurrence flow pane.
200
+
- In the search field type "**automation**" and select "**Azure Automation – Create job**" from the search results.
201
201
- In the Create job pane, configure the job properties. For this configuration, you will need details of your Azure subscription ID, Resource Group and Automation Account **previously recorded** at the **Automation Account pane**. To learn more about options available in this section, see [Azure Automation - Create Job](https://docs.microsoft.com/connectors/azureautomation/#create-job).
202
-
- Complete creating this action by clicking on "**Save flow**"
202
+
- Complete creating this action by clicking on "**Save flow**".
203
203
204
204
2. Create action to retrieve output from the executed PowerShell script
205
205
206
206
- Select "**+New step**", followed by "**Add an action**" inside the Recurrence flow pane
207
207
- In the search filed type "**automation**" and select "**Azure Automation – Get job output**" from the search results. To learn more about options available in this section, see [Azure Automation – Get job output](https://docs.microsoft.com/connectors/azureautomation/#get-job-output).
208
-
- Populate fields required (similar to creating the previous job) - populate your Azure subscription ID, Resource Group, and Automation Account (as entered in the Automation Account pane)
208
+
- Populate fields required (similar to creating the previous job) - populate your Azure subscription ID, Resource Group, and Automation Account (as entered in the Automation Account pane).
209
209
- Click inside the field "**Job ID**" for the "**Dynamic content**" menu to show up. From within this menu, select the option "**Job ID**".
210
-
- Complete creating this action by clicking on "**Save flow**"
210
+
- Complete creating this action by clicking on "**Save flow**".
211
211
212
212
3. Create action to send out email using Office 365 integration
213
213
214
-
- Select "**+New step**", followed by "**Add an action**" inside the Recurrence flow pane
215
-
- In the search filed type "**send an email**" and select "**Office 365 Outlook – Send an email**" from the search results
216
-
- In the "**To**" field type in the email address to which you need to send the notification email
217
-
- In the "**Subject**" field type in the subject of your email, for example "Automatic tuning recommendations email notification"
218
-
- Click inside the field "**Body**" for the "**Dynamic content**" menu to show up. From within this menu, under "**Get job output**", select "**Content**"
219
-
- Complete creating this action by clicking on "**Save flow**"
214
+
- Select "**+New step**", followed by "**Add an action**" inside the Recurrence flow pane.
215
+
- In the search filed type "**send an email**" and select "**Office 365 Outlook – Send an email**" from the search results.
216
+
- In the "**To**" field type in the email address to which you need to send the notification email.
217
+
- In the "**Subject**" field type in the subject of your email, for example "Automatic tuning recommendations email notification".
218
+
- Click inside the field "**Body**" for the "**Dynamic content**" menu to show up. From within this menu, under "**Get job output**", select "**Content**".
219
+
- Complete creating this action by clicking on "**Save flow**".
220
220
221
221
> [!TIP]
222
222
> To send automated emails to different recipients, create separate flows. In these additional flows, change the recipient email address in the "To" field, and the email subject line in the "Subject" field. Creating new runbooks in Azure Automation with customized PowerShell scripts (such as with change of Azure subscription ID) enables further customization of automated scenarios, such is for example emailing separate recipients on Automated tuning recommendations for separate subscriptions.
0 commit comments