編輯

共用方式為


Get-AzAutomationSoftwareUpdateRun

Gets a list of azure automation software update runs.

Syntax

Get-AzAutomationSoftwareUpdateRun
   [-OperatingSystem <OperatingSystemType>]
   [-Status <SoftwareUpdateRunStatus>]
   [-StartTime <DateTimeOffset>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationSoftwareUpdateRun
   -Id <Guid>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationSoftwareUpdateRun
   [-SoftwareUpdateConfigurationName <String>]
   [-OperatingSystem <OperatingSystemType>]
   [-Status <SoftwareUpdateRunStatus>]
   [-StartTime <DateTimeOffset>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationSoftwareUpdateRun
   [-SoftwareUpdateConfiguration <SoftwareUpdateConfiguration>]
   [-OperatingSystem <OperatingSystemType>]
   [-Status <SoftwareUpdateRunStatus>]
   [-StartTime <DateTimeOffset>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzAutomationSoftwareUpdateRun cmdlet returns a list of software update runs. Since a software update configuration has an associated schedule, it can be triggered multiple times. Each time a schedule is triggered will result in an update run created. Update run is an aggregate of the result of all machine runs. You can get runs for specific software update configuration by passing the SoftwareUpdateConfigurationName parameter. To get a specific runs, you need to pass the name parameter. You can also list runs with specific status, runs targeting specific operating system, or runs started after specific time by passing the appropriate parameter.

Examples

Example 1

This example list all update runs triggered by a specific software update configuration.

Get-AzAutomationSoftwareUpdateRun -ResourceGroupName "mygroup" `
                                               -AutomationAccountName "myaccount" `
                                               -SoftwareUpdateConfigurationName "MyUpdateConfiguration"

RunId                           : ec9ce57f-da18-44be-b33b-651a0f93cb52
SoftwareUpdateConfigurationName : MyUpdateConfiguration
ConfiguredDuration              : 02:00:00
OperatingSystem                 : Windows
StartTime                       : 5/22/2018 11:37:42 PM +00:00
EndTime                         : 5/22/2018 11:38:31 PM +00:00
ComputerCount                   : 2
FailedCount                     : 0
ResourceGroupName               : mygroup
AutomationAccountName           : myaccount
Name                            : ec9ce57f-da18-44be-b33b-651a0f93cb52
CreationTime                    : 5/22/2018 11:37:42 PM +00:00
LastModifiedTime                : 5/22/2018 11:38:54 PM +00:00
Description                     :

RunId                           : ac9396c7-a837-43d4-be97-fbfe46c80baa
SoftwareUpdateConfigurationName : MyUpdateConfiguration
ConfiguredDuration              : 02:00:00
OperatingSystem                 : Windows
StartTime                       : 5/22/2018 10:00:47 PM +00:00
EndTime                         : 5/22/2018 10:02:20 PM +00:00
ComputerCount                   : 2
FailedCount                     : 0
ResourceGroupName               : mygroup
AutomationAccountName           : myaccount
Name                            : ac9396c7-a837-43d4-be97-fbfe46c80baa
CreationTime                    : 5/22/2018 10:00:47 PM +00:00
LastModifiedTime                : 5/22/2018 10:02:58 PM +00:00

Parameters

-AutomationAccountName

The automation account name.

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

Id of the software update configuration run.

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

-OperatingSystem

The operating system of the run.

Type:Nullable<T>[OperatingSystemType]
Accepted values:Windows, Linux
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

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

-SoftwareUpdateConfiguration

The software update configuration triggered the run.

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

-SoftwareUpdateConfigurationName

Name of the software update configuration triggered the run.

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

-StartTime

Minimum start time of the run.

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

-Status

Status of the run.

Type:Nullable<T>[SoftwareUpdateRunStatus]
Accepted values:NotStarted, InProgress, Succeeded, Failed, MaintenanceWindowExceeded
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Guid

String

SoftwareUpdateConfiguration

Nullable<T>[[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.OperatingSystemType, Microsoft.Azure.PowerShell.Cmdlets.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Nullable<T>[[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRunStatus, Microsoft.Azure.PowerShell.Cmdlets.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

DateTimeOffset

Outputs

SoftwareUpdateRun