你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureRmAutomationDscNodeReport
获取从 DSC 节点发送到自动化的报表。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureRmAutomationDscNodeReport
-NodeId <Guid>
[-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmAutomationDscNodeReport
-NodeId <Guid>
[-Latest]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmAutomationDscNodeReport
-NodeId <Guid>
-Id <Guid>
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureRmAutomationDscNodeReport cmdlet 从 APS Desired State Configuration (DSC) 节点发送到Azure 自动化的报告。
示例
示例 1:获取 DSC 节点的所有报表
PS C:\>$Node = Get-AzureRmAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
PS C:\> Get-AzureRmAutomationDscNodeReport -ResourceGroupName "ResourceGroup14" -AutomationAccountName "Contoso17" -NodeId $Node.Id
第一个命令获取名为 Contoso17 的自动化帐户中名为 Computer14 的计算机的 DSC 节点。 该命令将此对象存储在$Node变量中。 第二个命令获取从名为 Computer14 的 DSC 节点发送到名为 Contoso17 的自动化帐户的所有报告的元数据。 该命令使用 $Node对象的 Id 属性指定节点。
示例 2:按报表 ID 获取 DSC 节点的报表
PS C:\>$Node = Get-AzureRmAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
PS C:\> Get-AzureRmAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeId $Node.Id -Id c0a1718e-d8be-4fa3-91b6-82e1d3a36298
第一个命令获取名为 Contoso17 的自动化帐户中名为 Computer14 的计算机的 DSC 节点。 该命令将此对象存储在$Node变量中。 第二个命令获取由从名为 Computer14 的 DSC 节点发送到名为 Contoso17 的自动化帐户所标识的报表的元数据。
示例 3:获取 DSC 节点的最新报告
PS C:\>$Node = Get-AzureRmAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name "Computer14"
PS C:\> Get-AzureRmAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -NodeId $Node.Id -Latest
第一个命令获取名为 Contoso17 的自动化帐户中名为 Computer14 的计算机的 DSC 节点。 该命令将此对象存储在$Node变量中。 第二个命令获取从名为 Computer14 的 DSC 节点发送到名为 Contoso17 的自动化帐户的最新报告的元数据。
参数
-AutomationAccountName
指定自动化帐户的名称。 此 cmdlet 导出属于此参数指定的帐户的 DSC 节点的报告。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EndTime
指定结束时间。 此 cmdlet 获取此时间之前收到的自动化的报告。
类型: | Nullable<T>[DateTimeOffset] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Id
指定要获取的此 cmdlet 的 DSC 节点报告的唯一 ID。
类型: | Guid |
别名: | ReportId |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Latest
指示此 cmdlet 仅获取指定节点的最新 DSC 报告。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-NodeId
指定此 cmdlet 为其获取报告的 DSC 节点的唯一 ID。
类型: | Guid |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
指定包含此 cmdlet 为其获取报告的 DSC 节点的资源组的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-StartTime
指定开始时间。 此 cmdlet 可获取此时间之后收到的自动化报告。
类型: | Nullable<T>[DateTimeOffset] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
输入
Nullable<T>[[System.DateTimeOffset, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]