Import-​Azure​Rm​Automation​Dsc​Node​Configuration

Imports a MOF document as a DSC node configuration in Automation.

Syntax

Import-AzureRmAutomationDscNodeConfiguration
      [-ResourceGroupName] <String>
      [-AutomationAccountName] <String>
      -ConfigurationName <String>
      [-Force]
      -Path <String>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Import-AzureRmAutomationDscConfiguration cmdlet imports a Managed Object Format (MOF) configuration document into Azure Automation as a Desired State Configuration (DSC) node configuration. Specify the path of a .mof file.

Examples

Example 1: Import a DSC node configuration into Automation

PS C:\>Import-AzureRmAutomationDscConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -ConfigurationName "ContosoConfiguration" -Path "C:\DSC\webserver.mof" -Force

This command imports a DSC node configuration from the file named webserver.mof into the Automation account named Contoso17, under the DSC configuration ContosoConfiguration. The command specifies the Force parameter. If there is an existing DSC node configuration named ContosoConfiguration.webserver, this command replaces it.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account into which this cmdlet imports a DSC node configuration.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ConfigurationName

Specifies the name of a DSC configuration in Automation to use as the namespace and container for the node configuration to import.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Path

Specifies the path of the MOF configuration document that this cmdlet imports.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of a resource group for which this cmdlet imports a DSC node configuration.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Indicates that this cmdlet replaces an existing DSC node configuration in Automation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False