Share via


Get-CrmOperationStatus

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

Syntax

Default (Default)

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.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DwsServerUrl

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Timeout

For internal use only.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

Inputs

System.Guid

System.Int32

System.Management.Automation.SwitchParameter

System.Management.Automation.PSCredential

System.String

Outputs

Microsoft.Xrm.Sdk.Deployment.DeferredOperationStatus