Modifier

Partager via


Get-AzAutomationDscOnboardingMetaconfig

Creates meta-configuration .mof files.

Syntax

Get-AzAutomationDscOnboardingMetaconfig
   [-OutputFolder <String>]
   [-ComputerName <String[]>]
   [-Force]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Get-AzAutomationDscOnboardingMetaconfig cmdlet creates APS Desired State Configuration (DSC) meta-configuration Managed Object Format (MOF) files. This cmdlet creates a .mof file for each computer name that you specify. The cmdlet creates a folder for the .mof files. You can run the Set-DscLocalConfigurationManager cmdlet for this folder to onboard these computers into an Azure Automation account as DSC nodes.

Examples

Example 1: Onboard servers to Automation DSC

Get-AzAutomationDscOnboardingMetaconfig -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -ComputerName "Server01", "Server02" -OutputFolder "C:\Users\PattiFuller\Desktop"
Set-DscLocalConfigurationManager -Path "C:\Users\PattiFuller\Desktop\DscMetaConfigs" -ComputerName "Server01", "Server02"

The first command creates DSC meta-configuration files for two servers for the Automation account named Contoso17. The command saves these files on a desktop. The second command uses the Set-DscLocalConfigurationManager cmdlet to apply the meta-configuration to the specified computers to onboard them as DSC nodes.

Parameters

-AutomationAccountName

Specifies the name of an Automation account. You can onboard the computers that the ComputerName parameter specifies to the account that this parameter specifies.

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

-ComputerName

Specifies an array of names of computers for which this cmdlet generates .mof files. If you do not specify this parameter, the cmdlet generates an .mof file for the current computer (localhost).

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without prompting you for confirmation, and to replace existing .mof files that have the same name.

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

-OutputFolder

Specifies the name of a folder where this cmdlet stores .mof files.

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

-ResourceGroupName

Specifies the name of a resource group. This cmdlet creates .mof files to onboard computers in the resource group that this parameter specifies.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

String[]

Outputs

DscOnboardingMetaconfig