Get-AzAutomationSoftwareUpdateMachineRun
Gets a list of azure automation software update configuration machine runs.
Syntax
ByAll (Default)
Get-AzAutomationSoftwareUpdateMachineRun
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-Status <SoftwareUpdateMachineRunStatus>]
[-TargetComputer <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ById
Get-AzAutomationSoftwareUpdateMachineRun
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
-Id <Guid>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
BySucrId
Get-AzAutomationSoftwareUpdateMachineRun
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-SoftwareUpdateRunId <Guid>]
[-Status <SoftwareUpdateMachineRunStatus>]
[-TargetComputer <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
BySucr
Get-AzAutomationSoftwareUpdateMachineRun
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-SoftwareUpdateRun <SoftwareUpdateRun>]
[-Status <SoftwareUpdateMachineRunStatus>]
[-TargetComputer <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
This cmdlet returns a list of machine runs. Each software update run will trigger a machine run for each of the software update configuration target machine. To get a specific machine run, pass the Id parameter. You can list all the machine runs, all runs for a specific computer, all runs with specific status by passing the corresponding parameters.
Examples
Example 1
This example returns all failed machine runs for the specified azure virtual machine.
$targetComputer = "/subscriptions/22e2445a-0984-4fa5-86a4-0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/myvm"
Get-AzAutomationSoftwareUpdateMachineRun -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-TargetComputer $targetComputer `
-Status Failed
MachineRunId : 0033d6d6-828d-4712-adab-293cc4fc8809
TargetComputer : /subscriptions/22e2445a-0984-4fa5-86a4-0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/myvm
TargetComputerType : AzureVirtualMachines
SoftwareUpdateRunId : 46568d26-0182-49b2-8bfd-af3455780397
OperatingSystem : Windows
Status : Failed
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : 0033d6d6-828d-4712-adab-293cc4fc8809
CreationTime : 5/17/2018 2:06:44 AM +00:00
LastModifiedTime : 5/17/2018 2:08:49 AM +00:00
Parameters
-AutomationAccountName
The automation account name.
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
-Id
Id of the software update machine run.
Parameter properties
Type: Guid
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ById
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
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
-SoftwareUpdateRun
The software update run.
Parameter properties
Parameter sets
BySucr
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SoftwareUpdateRunId
Id of the software update run.
Parameter properties
Type: Guid
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
BySucrId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Status
Status of the machine run.
Parameter properties
Type: Nullable<T> [ SoftwareUpdateMachineRunStatus ]
Default value: None
Accepted values: NotStarted, InProgress, Succeeded, Failed, MaintenanceWindowExceeded, FailedToStart
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
BySucrId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
BySucr
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-TargetComputer
target computer for the machine run.
Can be either a non-az computer name or an azure VM resource id.
Parameter properties
Type: String
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
BySucrId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
BySucr
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 .
Outputs