< Back

Import-AzureRmAutomationDscNodeConfiguration

Tue Jan 29, 2019 9:32 pm

NAME Import-AzureRmAutomationDscNodeConfiguration



SYNOPSIS

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





SYNTAX

Import-AzureRmAutomationDscNodeConfiguration [-ResourceGroupName] <String> [-AutomationAccountName] <String> -ConfigurationName <String>

[-DefaultProfile <IAzureContextContainer>] [-Force] [-IncrementNodeConfigurationBuild] -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.





PARAMETERS

-AutomationAccountName <String>

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



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ConfigurationName <String>

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



Required? true

Position? named

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



-Force [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-IncrementNodeConfigurationBuild [<SwitchParameter>]

Creates a new Node Configuration build version.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Path <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

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.NodeConfiguration







NOTES









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.





Example 2: Import a DSC node configuration into Automation and create a new build version and not overwrite existing NodeConfiguration.



PS C:\\>Import-AzureRmAutomationDscConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -ConfigurationName

"ContosoConfiguration" -Path "C:\\DSC\\webserver.mof" -IncrementNodeConfigurationBuild



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 adds a new build version with the name ContosoConfiguration[2].webserver.







RELATED LINKS

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

Export-AzureRmAutomationDscConfiguration

Get-AzureRmAutomationDscConfiguration