Edit

Share via


Get-AzAutomationDscNodeReport

Gets reports sent from a DSC node to Automation.

Syntax

ByAll (Default)

Get-AzAutomationDscNodeReport
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    -NodeId <Guid>
    [-StartTime <DateTimeOffset>]
    [-EndTime <DateTimeOffset>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByLatest

Get-AzAutomationDscNodeReport
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    -NodeId <Guid>
    [-Latest]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ById

Get-AzAutomationDscNodeReport
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    -NodeId <Guid>
    -Id <Guid>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzAutomationDscNodeReport cmdlet gets reports sent from an APS Desired State Configuration (DSC) node to Azure Automation.

Examples

Example 1: Get all reports for a DSC node

$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeId $Node.Id

The first command gets the DSC node for the computer named Computer14 in the Automation account named Contoso17. The command stores this object in the $Node variable. The second command gets metadata for all reports sent from the DSC node named Computer14 to the Automation account named Contoso17. The command specifies the node by using the Id property of the $Node object.

Example 2: Get a report for a DSC node by report ID

$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeId $Node.Id -Id c0a1718e-d8be-4fa3-91b6-82e1d3a36298

The first command gets the DSC node for the computer named Computer14 in the Automation account named Contoso17. The command stores this object in the $Node variable. The second command gets metadata for the report identified by the specified ID sent from the DSC node named Computer14 to the Automation account named Contoso17.

Example 3: Get the latest report for a DSC node

$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeId $Node.Id -Latest

The first command gets the DSC node for the computer named Computer14 in the Automation account named Contoso17. The command stores this object in the $Node variable. The second command gets metadata for the latest report sent from the DSC node named Computer14 to the Automation account named Contoso17.

Parameters

-AutomationAccountName

Specifies the name of an Automation account. This cmdlet exports reports for a DSC node that belongs to the account that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EndTime

Specifies an end time. This cmdlet gets reports that Automation received before this time.

Parameter properties

Type:

Nullable<T>[DateTimeOffset]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAll
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Id

Specifies the unique ID of the DSC node report for this cmdlet to get.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ReportId

Parameter sets

ById
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Latest

Indicates that this cmdlet gets the latest DSC report for the specified node only.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByLatest
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeId

Specifies the unique ID of the DSC node for which this cmdlet gets reports.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of a resource group that contains the DSC node for which this cmdlet gets reports.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StartTime

Specifies a start time. This cmdlet gets reports that Automation received after this time.

Parameter properties

Type:

Nullable<T>[DateTimeOffset]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAll
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Guid

Nullable<T>

String

Outputs

DscNode