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
Copy file name to clipboardExpand all lines: articles/automation/automation-hrw-run-runbooks.md
+1-100Lines changed: 1 addition & 100 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Define permissions for your runbook to run on the Hybrid Runbook Worker in the f
63
63
64
64
* Have the runbook provide its own authentication to local resources.
65
65
* Configure authentication using [managed identities for Azure resources](../active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-arm.md#grant-your-vm-access-to-a-resource-group-in-resource-manager).
66
-
* Specify a Run As account to provide a user context for all runbooks.
66
+
* Specify Hybrid Worker credentials to provide a user context for all runbooks.
67
67
68
68
### Use runbook authentication to local resources
69
69
@@ -217,105 +217,6 @@ By default, the Hybrid jobs run under the context of System account. However, to
217
217
>[!NOTE]
218
218
>Linux Hybrid Worker doesn't support Hybrid Worker credentials.
219
219
220
-
## <a name="runas-script"></a>Install Run As account certificate
221
-
222
-
As part of your automated build process for deploying resources in Azure, you might require access to on-premises systems to support a task or set of steps in your deployment sequence. To provide authentication against Azure using the Run As account, you must install the Run As account certificate.
223
-
224
-
>[!NOTE]
225
-
>This PowerShell runbook currently does not run on Linux machines. It runs only on Windows machines.
226
-
227
-
228
-
The following PowerShell runbook, called **Export-RunAsCertificateToHybridWorker**, exports the Run As certificate from your Azure Automation account. The runbook downloads and imports the certificate into the local machine certificate store on a Hybrid Runbook Worker that is connected to the same account. Once it completes that step, the runbook verifies that the worker can successfully authenticate to Azure using the Run As account.
229
-
230
-
>[!NOTE]
231
-
>This PowerShell runbook is not designed or intended to be run outside of your Automation account as a script on the target machine.
232
-
>
233
-
234
-
```azurepowershell-interactive
235
-
<#PSScriptInfo
236
-
.VERSION 1.0
237
-
.GUID 3a796b9a-623d-499d-86c8-c249f10a6986
238
-
.AUTHOR Azure Automation Team
239
-
.COMPANYNAME Microsoft
240
-
.COPYRIGHT
241
-
.TAGS Azure Automation
242
-
.LICENSEURI
243
-
.PROJECTURI
244
-
.ICONURI
245
-
.EXTERNALMODULEDEPENDENCIES
246
-
.REQUIREDSCRIPTS
247
-
.EXTERNALSCRIPTDEPENDENCIES
248
-
.RELEASENOTES
249
-
#>
250
-
251
-
<#
252
-
.SYNOPSIS
253
-
Exports the Run As certificate from an Azure Automation account to a hybrid worker in that account.
254
-
255
-
.DESCRIPTION
256
-
This runbook exports the Run As certificate from an Azure Automation account to a hybrid worker in that account. Run this runbook on the hybrid worker where you want the certificate installed. This allows the use of the AzureRunAsConnection to authenticate to Azure and manage Azure resources from runbooks running on the hybrid worker.
>For PowerShell runbooks, `Add-AzAccount` and `Add-AzureRMAccount` are aliases for `Connect-AzAccount`. When searching your library items, if you do not see `Connect-AzAccount`, you can use `Add-AzAccount`, or you can update your modules in your Automation account.
305
-
306
-
To finish preparing the Run As account:
307
-
308
-
1. Save the **Export-RunAsCertificateToHybridWorker** runbook to your computer with a **.ps1** extension.
309
-
1. Import it into your Automation account.
310
-
1. Edit the runbook, changing the value of the `Password` variable to your own password.
311
-
1. Publish the runbook.
312
-
1. Run the runbook, targeting the Hybrid Runbook Worker group that runs and authenticates runbooks using the Run As account.
313
-
1. Examine the job stream to see that it reports the attempt to import the certificate into the local machine store, followed by multiple lines. This behavior depends on how many Automation accounts you define in your subscription and the degree of success of the authentication.
314
-
315
-
>[!NOTE]
316
-
> In case of unrestricted access, a user with VM Contributor rights or having permissions to run commands against the hybrid worker machine can use the Automation Account Run As certificate from the hybrid worker machine, using other sources like Azure cmdlets which could potentially allow a malicious user access as a subscription contributor. This could jeopardize the security of your Azure environment. </br> </br>
317
-
> We recommend that you divide the tasks within the team and grant the required permissions/access to users as per their job. Do not provide unrestricted permissions to the machine hosting the hybrid runbook worker role.
318
-
319
220
## Start a runbook on a Hybrid Runbook Worker
320
221
321
222
[Start a runbook in Azure Automation](start-runbooks.md) describes different methods for starting a runbook. Starting a runbook on a Hybrid Runbook Worker uses a **Run on** option that allows you to specify the name of a Hybrid Runbook Worker group. When a group is specified, one of the workers in that group retrieves and runs the runbook. If your runbook does not specify this option, Azure Automation runs the runbook as usual.
0 commit comments