Modifier

Partager via


Get-AzAutomationDscNode

Gets DSC nodes from Automation.

Syntax

Get-AzAutomationDscNode
   [-Status <DscNodeStatus>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationDscNode
   -Id <Guid>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationDscNode
   [-Status <DscNodeStatus>]
   -Name <String>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationDscNode
   [-Status <DscNodeStatus>]
   -NodeConfigurationName <String>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationDscNode
   -ConfigurationName <String>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzAutomationDscNode cmdlet gets APS Desired State Configuration (DSC) nodes from Azure Automation.

Examples

Example 1: Get all DSC nodes

Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"

This command gets metadata for all DSC nodes in the Automation account named Contoso17.

Example 2: Get all DSC nodes for a DSC configuration

Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -ConfigurationName "ContosoConfiguration"

This command gets metadata for all DSC nodes in the Automation account named Contoso17 that are mapped to a DSC node configuration which was generated by DSC configuration ContosoConfiguration.

Example 3: Get a DSC node by ID

Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Id c0a1718e-d8be-4fa3-91b6-82e1d3a36298

This command gets metadata on a DSC node with the specified ID in the Automation account named Contoso17.

Example 4: Get a DSC node by name

Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"

This command gets metadata on a DSC node with the name Computer14 in the Automation account named Contoso17.

Example 5: Get all DSC nodes mapped to a DSC node configuration

Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeConfigurationName "ContosoConfiguration.webserver"

This command gets metadata on all DSC nodes in the Automation account named Contoso17 that are mapped to a DSC node configuration named ContosoConfiguration.webserver.

Parameters

-AutomationAccountName

Specifies the name of the Automation account that contains the DSC nodes that this cmdlet gets.

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

-ConfigurationName

Specifies the name of a DSC configuration. This cmdlet gets DSC nodes that match the node configurations generated from the configuration that this parameter specifies.

Type:String
Position:Named
Default value:None
Required:True
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

-Id

Specifies the unique ID of the DSC node that this cmdlet gets.

Type:Guid
Aliases:NodeId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of a DSC node that this cmdlet gets.

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

-NodeConfigurationName

Specifies the name of a node configuration that this cmdlet gets.

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

-ResourceGroupName

Specifies the name of a resource group in which this cmdlet gets DSC nodes.

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

-Status

Specifies the status of the DSC nodes that this cmdlet gets. Valid values are:

  • Compliant
  • NotCompliant
  • Failed
  • Pending
  • Received
  • Unresponsive
Type:DscNodeStatus
Accepted values:Compliant, NotCompliant, Failed, Pending, Received, Unresponsive
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Guid

String

Outputs

DscNode