Get-CrmOperationStatus

Retrieves the status of asynchronous operations that are in the asynchronous operation queue for Dynamics 365.

Syntax

Get-CrmOperationStatus
   [-OperationId <Guid>]
   [-Timeout <Int32>]
   [-Diag]
   [-Credential <PSCredential>]
   [-DwsServerUrl <String>]

Description

The Get-CrmOperationStatus cmdlet retrieves the status of an asynchronous deployment operation. If no parameters are specified, all asynchronous deployment operations in the processing queue are returned. This cmdlet returns a DeferredOperationStatus object, or an array of DeferredOperationStatus objects in the queue.

Examples

Example 1

PS C:\> Get-CrmOperationStatus

Returns a list of all asynchronous deployment operations including the operation Id.

Example 2

PS C:\> Get-CrmOperationStatus -OperationId 31dc0f00-ecc6-4c05-8500-a20e7d995c10

Returns the DeferredOperationStatus for a given asynchronous OperationId. If you were using this in a polling fashion, you would monitor the State property of the object.

Parameters

-Credential

Expects a variable that contains the user credentials used for signing in to Dynamics 365 on-premises organization. To establish this variable, run the PowerShell command $Cred = Get-Credential.

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

-Diag

Turns on stack traces for error reports returned from Dynamics 365 service calls. Enabling this emits a detailed error message, including a stack trace, when an error is encountered by the Dynamics 365 PowerShell command.

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

-DwsServerUrl

The URL of the Deployment Web Service. This should be in the format: https://, for example, https://contoso.

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

-OperationId

Specifies the GUID of an asynchronous operation in the queue. If this parameter is supplied, the status of the specified operation is returned. Otherwise, the status of all operations in the queue is returned. This Id is returned by calls to New-CrmOrganization and Update-CrmOrganization.

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

-Timeout

For internal use only.

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

Inputs

System.Guid

System.Int32 System.Management.Automation.SwitchParameter System.Management.Automation.PSCredential System.String

Outputs

Microsoft.Xrm.Sdk.Deployment.DeferredOperationStatus

System.Collections.Generic.List`1[[Microsoft.Xrm.Sdk.Deployment.DeferredOperationStatus, Microsoft.Crm.PowerShell, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]