Register-​Azure​Rm​Automation​Dsc​Node

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

Syntax

Register-AzureRmAutomationDscNode
        [-ResourceGroupName] <String>
        [-AutomationAccountName] <String>
        [-ActionAfterReboot <String>]
        [-AllowModuleOverwrite <Boolean>]
        [-AzureVMLocation <String>]
        -AzureVMName <String>
        [-AzureVMResourceGroup <String>]
        [-ConfigurationMode <String>]
        [-ConfigurationModeFrequencyMins <Int32>]
        [-NodeConfigurationName <String>]
        [-RebootNodeIfNeeded <Boolean>]
        [-RefreshFrequencyMins <Int32>]
        [<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-AzureAutomationDscNode -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.

Required Parameters

-AutomationAccountName

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

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
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 (ByPropertyName)
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:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-ActionAfterReboot

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

  • StopConfiguration
Type:String
Parameter Sets:ContinueConfiguration, StopConfiguration
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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 (ByPropertyName)
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 (ByPropertyName)
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 (ByPropertyName)
Accept wildcard characters:False
-ConfigurationMode

Specifies the DSC configuration mode. Valid values are: - ApplyAndMonitor

  • ApplyAndAutocorrect
  • ApplyOnly
Type:String
Parameter Sets:ApplyAndMonitor, ApplyAndAutocorrect, ApplyOnly
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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 (ByPropertyName)
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 (ByPropertyName)
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 (ByPropertyName)
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 (ByPropertyName)
Accept wildcard characters:False