Register-AzureRmAutomationDscNode

Registers an Azure virtual machine as a DSC node for an Automation account.

Important

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

Register-AzureRmAutomationDscNode
        -AzureVMName <String>
        [-NodeConfigurationName <String>]
        [-ConfigurationMode <String>]
        [-ConfigurationModeFrequencyMins <Int32>]
        [-RefreshFrequencyMins <Int32>]
        [-RebootNodeIfNeeded <Boolean>]
        [-ActionAfterReboot <String>]
        [-AllowModuleOverwrite <Boolean>]
        [-AzureVMResourceGroup <String>]
        [-AzureVMLocation <String>]
        [-ResourceGroupName] <String>
        [-AutomationAccountName] <String>
        [-DefaultProfile <IAzureContextContainer>]
        [<CommonParameters>]

Description

The Register-AzureRmAutomationDscNode cmdlet registers an Azure virtual machine as an APS Desired State Configuration (DSC) node in an Azure Automation account.

Examples

Example 1: Register an Azure virtual machine as an Azure DSC node

PS C:\>Register-AzureRmAutomationDscNode -AutomationAccountName "Contoso17" -AzureVMName "VirtualMachine01" -ResourceGroupName "ResourceGroup01"-NodeConfigurationName "ContosoConfiguration.webserver"

This command registers the Azure virtual machine named VirtualMachine01 as a DSC node in the Automation account named Contoso17.

Parameters

-ActionAfterReboot

Specifies the action that the virtual machine takes after it restarts. Valid values are:

  • ContinueConfiguration
  • StopConfiguration
Type:String
Accepted values:ContinueConfiguration, StopConfiguration
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-AllowModuleOverwrite

Specifies whether new configurations that this DSC node downloads from the Azure Automation DSC pull server replace the existing modules already on the target node.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-AutomationAccountName

Specifies the name of an Automation account in which this cmdlet registers a virtual machine.

Type:String
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-AzureVMLocation

Specifies the location in which this cmdlet registers a virtual machine. To obtain valid locations, use the Get-AzureRMLocation cmdlet.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-AzureVMName

Specifies the name of the Azure virtual machine that this cmdlet registers for management.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-AzureVMResourceGroup

Specifies the name of the resource group of the Azure virtual machine that this cmdlet registers.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ConfigurationMode

Specifies the DSC configuration mode. Valid values are:

  • ApplyAndMonitor
  • ApplyAndAutocorrect
  • ApplyOnly
Type:String
Accepted values:ApplyAndMonitor, ApplyAndAutocorrect, ApplyOnly
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ConfigurationModeFrequencyMins

Specifies the frequency, in minutes, at which the background application of DSC attempts to implement the current configuration on the target node.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NodeConfigurationName

Specifies the name of the node configuration that this cmdlet configures the virtual machine to pull from Azure Automation DSC.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-RebootNodeIfNeeded

Specifies whether to restart the virtual machine, if needed.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-RefreshFrequencyMins

Specifies the frequency, in minutes, at which the local Configuration Manager contacts the Azure Automation DSC pull server to download the latest node configuration.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of a resource group. The Automation account with which this cmdlet registers a virtual machine belongs to the resource group that this parameter specifies.

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Int32

Boolean

Outputs

Void