Register-AzureRmAutomationDscNode

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

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

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
Required:False
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
Required:False
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
Required:True
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
Required:False
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
Required:True
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
Required:False
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
Required:False
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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
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
Required:False
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
Required:False
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
Required:False
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Int32

Boolean

Outputs

Void