Skip to content

Commit f8f21d8

Browse files
authored
Update pre-post-scripts.md
1 parent 189184d commit f8f21d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/automation/pre-post-scripts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ manager: carmonm
1212
---
1313
# Manage pre and post-scripts
1414

15-
Pre-scripts and post-scripts let you run PowerShell runbooks in your automation account before (pre-task) and after (post-task) an update deployment. Pre and post-scripts run in the Azure context, not locally. Pre-scripts run at the beginning of the update deployment. Post-scripts run at the end of the deployment and after any reboots that are configured.
15+
Pre-scripts and post-scripts let you run PowerShell runbooks in your Azure Automation account before (pre-task) and after (post-task) an update deployment. Pre and post-scripts run in the Azure context, not locally. Pre-scripts run at the beginning of the update deployment. Post-scripts run at the end of the deployment and after any reboots that are configured.
1616

1717
## Runbook requirements
1818

19-
For a runbook to be used as a pre or post-script, the runbook must be imported into your automation account and published. To learn more about this process, see [Publish a runbook](manage-runbooks.md#publish-a-runbook).
19+
For a runbook to be used as a pre or post-script, the runbook must be imported into your Automation account and published. To learn more about this process, see [Publish a runbook](manage-runbooks.md#publish-a-runbook).
2020

2121
## Using a pre-script or post-script
2222

@@ -135,7 +135,7 @@ foreach($summary in $finalStatus)
135135

136136
## Samples
137137

138-
Samples for pre and post-scripts can be found in the [Script Center Gallery](https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=WindowsAzure&f%5B0%5D.Text=Windows%20Azure&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=WindowsAzure_automation&f%5B1%5D.Text=Automation&f%5B2%5D.Type=SearchText&f%5B2%5D.Value=update%20management&f%5B3%5D.Type=Tag&f%5B3%5D.Value=Patching&f%5B3%5D.Text=Patching&f%5B4%5D.Type=ProgrammingLanguage&f%5B4%5D.Value=PowerShell&f%5B4%5D.Text=PowerShell) and the [PowerShell Gallery](https://www.powershellgallery.com/packages?q=Tags%3A%22UpdateManagement%22+Tags%3A%22Automation%22), or you can import them through the Azure portal. To do that, in your automation account, under **Process Automation**, select **Runbooks Gallery**. Use **Update Management** for the filter.
138+
Samples for pre and post-scripts can be found in the [Script Center Gallery](https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=WindowsAzure&f%5B0%5D.Text=Windows%20Azure&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=WindowsAzure_automation&f%5B1%5D.Text=Automation&f%5B2%5D.Type=SearchText&f%5B2%5D.Value=update%20management&f%5B3%5D.Type=Tag&f%5B3%5D.Value=Patching&f%5B3%5D.Text=Patching&f%5B4%5D.Type=ProgrammingLanguage&f%5B4%5D.Value=PowerShell&f%5B4%5D.Text=PowerShell) and the [PowerShell Gallery](https://www.powershellgallery.com/packages?q=Tags%3A%22UpdateManagement%22+Tags%3A%22Automation%22), or you can import them through the Azure portal. To do that, in your Automation account, under **Process Automation**, select **Runbooks Gallery**. Use **Update Management** for the filter.
139139

140140
![Gallery list](./media/pre-post-scripts/runbook-gallery.png)
141141

@@ -148,7 +148,7 @@ Or you can search for them by their script name, as shown in the following list:
148148
* Update Management - Run Script with Run Command
149149

150150
> [!IMPORTANT]
151-
> After you import the runbooks, you must publish them before they can be used. To do that, find the runbook in your automation account, select **Edit**, and then select **Publish**.
151+
> After you import the runbooks, you must publish them before they can be used. To do that, find the runbook in your Automation account, select **Edit**, and then select **Publish**.
152152
153153
The samples are all based on the basic template that's defined in the following example. This template can be used to create your own runbook to use with pre and post-scripts. The necessary logic for authenticating with Azure and handling the `SoftwareUpdateConfigurationRunContext` parameter is included.
154154

@@ -205,7 +205,7 @@ $variable = Get-AutomationVariable -Name $runId
205205

206206
## Interacting with machines
207207

208-
Pre and post-tasks run as a runbook in your automation account and not directly on the machines in your deployment. Pre and post-tasks also run in the Azure context and don't have access to non-Azure machines. The following sections show how you can interact with the machines directly, whether they're Azure VMs or non-Azure machines.
208+
Pre and post-tasks run as a runbook in your Automation account and not directly on the machines in your deployment. Pre and post-tasks also run in the Azure context and don't have access to non-Azure machines. The following sections show how you can interact with the machines directly, whether they're Azure VMs or non-Azure machines.
209209

210210
### Interacting with Azure machines
211211

0 commit comments

Comments
 (0)