Get-CrmOrganizations

Returns a list of Dataverse environments or Dynamics 365 Customer Engagement (on-premises) organizations that the current user has access to.

Syntax

Get-CrmOrganizations
   [[-DeploymentRegion] <String>]
   [-OnLineType] <OnlineType>
   [[-Credential] <PSCredential>]
   [[-MaxCrmConnectionTimeOutMinutes] <Int32>]
   [-LogWriteDirectory <String>]
   [-WhatIf]
   [-Confirm]
Get-CrmOrganizations
   [[-HomeRealmUrl] <Uri>]
   [-ServerUrl] <Uri>
   [[-Credential] <PSCredential>]
   [[-MaxCrmConnectionTimeOutMinutes] <Int32>]
   [-LogWriteDirectory <String>]
   [-WhatIf]
   [-Confirm]

Description

The Get-CrmOrganizations cmdlet returns a list of Dataverse environments or Dynamics 365 Customer Engagement (on-premises) organizations that the current user has access to.

Examples

Example 1

PS C:\> Get-CrmOrganizations -OnLineType Office365 -Credential $cred

Returns a detailed list of all Dataverse environments across all geographic regions that the user has access to.

Example 2

PS C:\> Get-CrmOrganizations -DeploymentRegion NorthAmerica -OnLineType Office365 -Credential $cred

Returns a detailed list of all Dataverse environments in the named geographic region that the user has access to.

Example 3

PS C:\> Get-CrmOrganizations -ServerUrl https://myserver -Credential $cred

Returns a detailed list of all Dynamics 365 Customer Engagement (on-premises) organizations for the named Dynamics 365 server.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Credential

User credential for signing in to Dataverse or Dynamics 365 Customer Engagement (on-premises). For information about how to create this object, see Overview.

Type:PSCredential
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-DeploymentRegion

Geographic region of your Dataverse environment. Valid values are NorthAmerica, EMEA, APAC, SouthAmerica, Oceania, JPN, CAN, IND, and NorthAmerica2.

Type:String
Position:4
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-HomeRealmUrl

URI of the WS-Trust metadata endpoint.

Type:Uri
Position:3
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-LogWriteDirectory

Custom directory location to store the cmdlet log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location.

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

Maximum number in minutes to wait before quitting the operation.

Type:Int32
Position:20
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-OnLineType

Type of online service. Valid value is Office365.

Type:OnlineType
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ServerUrl

URL of the Dynamics 365 Customer Engagement (on-premises) server specified in the format https://:.

Type:Uri
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

System.String

System.Uri Microsoft.Xrm.Tooling.CrmConnector.Powershell.CommandsCommonAuth+OnlineType System.Management.Automation.PSCredential System.Int32

Outputs

System.Object