Freigeben über


Get-CrmOrganization

Retrieves information for one or all of the organizations in the Dynamics 365 deployment.

Syntax

Get-CrmOrganization
   [[-Name] <String>]
   [-Timeout <Int32>]
   [-Diag]
   [-Credential <PSCredential>]
   [-DwsServerUrl <String>]

Description

The Get-CrmOrganization cmdlet retrieves information for one or all of the organizations in the deployment. If no parameters are provided, the cmdlet retrieves details for all organizations in the deployment. If the Name parameter is provided, the cmdlet retrieves the organization with the specified name.

Examples

Example 1

PS C:\> Get-CrmOrganization

Retrieves information for all organizations in the deployment.

Example 2

PS C:\> Get-CrmOrganization -Name org1

Retrieves details for the org1 organization.

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

-Name

The unique name of the Dynamics 365 organization.

Type:String
Position:0
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.String

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

Outputs

Microsoft.Xrm.Sdk.Deployment.Organization

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