Editar

Partilhar via


Get-AzAksManagedClusterCommandResult

Gets the results of a command which has been run on the Managed Cluster.

Syntax

Get-AzAksManagedClusterCommandResult
   -CommandId <String>
   -ResourceGroupName <String>
   -ResourceName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [-PassThru]
   [<CommonParameters>]
Get-AzAksManagedClusterCommandResult
   -InputObject <IAksIdentity>
   [-DefaultProfile <PSObject>]
   [-PassThru]
   [<CommonParameters>]

Description

Gets the results of a command which has been run on the Managed Cluster.

Examples

Example 1: Get the results of a command which has been run on the Managed Cluster.

Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12'

ExitCode          : 0
FinishedAt        : 3/31/2023 9:14:40 AM
Id                : 706de66629b14267b4962cf015122c12
Log               : NAME                              STATUS   ROLES   AGE   VERSION
                    aks-default-40136599-vmss000000   Ready    agent   68m   v1.24.9
                    aks-pool2-22198594-vmss000000     Ready    agent   65m   v1.24.9

ProvisioningState : Succeeded
Reason            :
StartedAt         : 3/31/2023 9:14:38 AM

Parameters

-CommandId

Id of the command.

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

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-PassThru

Returns true when the command succeeds

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

-ResourceGroupName

The name of the resource group. The name is case insensitive.

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

-ResourceName

The name of the managed cluster resource.

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

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IAksIdentity

Outputs

IRunCommandResult