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/shared-resources/credentials.md
+12-23Lines changed: 12 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.service: automation
6
6
ms.subservice: shared-capabilities
7
7
author: mgoedtel
8
8
ms.author: magoedte
9
-
ms.date: 04/12/2019
9
+
ms.date: 01/31/2020
10
10
ms.topic: conceptual
11
11
manager: carmonm
12
12
---
@@ -19,27 +19,16 @@ An Automation credential asset holds an object, which contains security credenti
19
19
> [!NOTE]
20
20
> Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. These assets are encrypted and stored in Azure Automation using a unique key that is generated for each automation account. This key is stored in Key Vault. Before storing a secure asset, the key is loaded from Key Vault and then used to encrypt the asset.
21
21
22
-
## Azure Classic PowerShell cmdlets
22
+
## Azure PowerShell Az cmdlets
23
23
24
-
The cmdlets in the following table are used to create and manage automation credential assets with Windows PowerShell. They ship as part of the [Azure PowerShell module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
24
+
For Azure PowerShell Az module, the cmdlets in the following table are used to create and manage automation credential assets with Windows PowerShell. They ship as part of the [AzureAz.Automation module](/powershell/azure/new-azureps-module-az?view=azps-1.1.0), which is available for use in Automation runbooks and DSC configurations.
25
25
26
26
| Cmdlets | Description |
27
27
|:--- |:--- |
28
-
|[Get-AzureAutomationCredential](/powershell/module/servicemanagement/azure/get-azureautomationcredential)|Retrieves information about a credential asset. You can only retrieve the credential itself from **Get-AutomationPSCredential** activity. |
29
-
|[New-AzureAutomationCredential](/powershell/module/servicemanagement/azure/new-azureautomationcredential)|Creates a new Automation credential. |
30
-
|[Remove-AzureAutomationCredential](/powershell/module/servicemanagement/azure/new-azureautomationcredential)|Removes an Automation credential. |
31
-
|[Set-AzureAutomationCredential](/powershell/module/servicemanagement/azure/new-azureautomationcredential)|Sets the properties for an existing Automation credential. |
32
-
33
-
## AzureRM PowerShell cmdlets
34
-
35
-
For AzureRM, the cmdlets in the following table are used to create and manage automation credential assets with Windows PowerShell. They ship as part of the [AzureRM.Automation module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
36
-
37
-
| Cmdlets | Description |
38
-
|:--- |:--- |
39
-
|[Get-AzureRmAutomationCredential](/powershell/module/azurerm.automation/get-azurermautomationcredential)|Retrieves information about a credential asset. This does not return a PSCredential object. |
40
-
|[New-AzureRmAutomationCredential](/powershell/module/azurerm.automation/new-azurermautomationcredential)|Creates a new Automation credential. |
41
-
|[Remove-AzureRmAutomationCredential](/powershell/module/azurerm.automation/remove-azurermautomationcredential)|Removes an Automation credential. |
42
-
|[Set-AzureRmAutomationCredential](/powershell/module/azurerm.automation/set-azurermautomationcredential)|Sets the properties for an existing Automation credential. |
28
+
|[Get-AzAutomationCredential](/powershell/module/az.automation/get-azautomationcredential?view=azps-3.3.0)|Retrieves information about a credential asset. This does not return a PSCredential object. |
29
+
|[New-AzAutomationCredential](/powershell/module/az.automation/new-azautomationcredential?view=azps-3.3.0)|Creates a new Automation credential. |
30
+
|[Remove-AzAutomationCredential](/powershell/module/az.automation/remove-azautomationcredential?view=azps-3.3.0)|Removes an Automation credential. |
31
+
|[Set-AzAutomationCredential](/powershell/module/az.automation/set-azautomationcredential?view=azps-3.3.0)|Sets the properties for an existing Automation credential. |
43
32
44
33
## Activities
45
34
@@ -68,8 +57,8 @@ The function in the following table is used to access credentials in a Python2 r
68
57
### To create a new credential asset with the Azure portal
69
58
70
59
1. From your automation account, select **Credentials** under **Shared Resources**.
71
-
1.Click**+ Add a credential**.
72
-
1. Complete the form and click**Create** to save the new credential.
60
+
1.Select**Add a credential**.
61
+
1. Complete the form and select**Create** to save the new credential.
73
62
74
63
> [!NOTE]
75
64
> User accounts that use multi-factor authentication are not supported for use in Azure Automation.
You retrieve a credential asset in a runbook or DSC configuration with the **Get-AutomationPSCredential** activity. This returns a [PSCredential object](/dotnet/api/system.management.automation.pscredential) that you can use with an activity or cmdlet that requires a PSCredential parameter. You can also retrieve the properties of the credential object to use individually. The object has a property for the username and the secure password, or you can use the **GetNetworkCredential** method to return a [NetworkCredential](/dotnet/api/system.net.networkcredential) object that will provide an unsecured version of the password.
91
80
92
81
> [!NOTE]
93
-
> **Get-AzureRmAutomationCredential** does not return a **PSCredential** that can be used for authentication. It only provides information about the credential. If you need to use a credential in a runbook you must use the **Get-AutomationPSCredential** to retrieve the **PSCredential** object.
82
+
> **Get-AzAutomationCredential** does not return a **PSCredential** that can be used for authentication. It only provides information about the credential. If you need to use a credential in a runbook you must use the **Get-AutomationPSCredential** to retrieve the **PSCredential** object.
You can also use a credential to authenticate to Azure with [Connect-AzureRmAccount](/powershell/module/azurerm.profile/connect-azurermaccount). Under most circumstances, you should use a [Run As account](../manage-runas-account.md) and retrieve it with [Get-AutomationConnection](../automation-connections.md).
95
+
You can also use a credential to authenticate to Azure with [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount?view=azps-3.3.0). Under most circumstances, you should use a [Run As account](../manage-runas-account.md) and retrieve it with [Get-AzAutomationConnection](../automation-connections.md).
@@ -122,7 +111,7 @@ You add a **Get-AutomationPSCredential** activity to a graphical runbook by righ
122
111
123
112

124
113
125
-
The following image shows an example of using a credential in a graphical runbook. In this case, it's being used to provide authentication for a runbook to Azure resources as described in [Authenticate Runbooks with Azure AD User account](../automation-create-aduser-account.md). The first activity retrieves the credential that has access to the Azure subscription. The **Add-AzureAccount** activity then uses this credential to provide authentication for any activities that come after it. A [pipeline link](../automation-graphical-authoring-intro.md#links-and-workflow) is here since **Get-AutomationPSCredential** is expecting a single object.
114
+
The following image shows an example of using a credential in a graphical runbook. In this case, it's being used to provide authentication for a runbook to Azure resources as described in [Authenticate Runbooks with Azure AD User account](../automation-create-aduser-account.md). The first activity retrieves the credential that has access to the Azure subscription. The **Add-AzureRmAccount** activity then uses this credential to provide authentication for any activities that come after it. A [pipeline link](../automation-graphical-authoring-intro.md#links-and-workflow) is here since **Get-AutomationPSCredential** is expecting a single object.
126
115
127
116

0 commit comments