< Back

New-AzureRmAutomationKey

Tue Jan 29, 2019 9:32 pm

NAME New-AzureRmAutomationKey



SYNOPSIS

Regenerates registration keys for an Automation account.





SYNTAX

New-AzureRmAutomationKey [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-KeyType] {Primary | Secondary} [-DefaultProfile

<IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

The New-AzureRmAutomationKey cmdlet regenerates registration keys for an Azure Automation account.





PARAMETERS

-AutomationAccountName <String>

Specifies the name of an Automation account for which this cmdlet regenerates keys.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-KeyType <String>

Specifies the type of the agent registration key. Valid values are:



- Primary



- Secondary



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of a resource group. This cmdlet regenerates keys for an Automation account in the resource group that this parameter

specifies.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Automation.Model.AgentRegistration







NOTES









Example 1: Regenerate a key for an Automation account



PS C:\\>New-AzureAutomationKey -KeyType Primary -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01"



This command regenerates the primary key for the Azure Automation account named AutomationAccount01 in the resource group named ResourceGroup01.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... omationkey