Get-CrmOrganizations

Get-CrmOrganizations

Returns a list of organizations that the current user has access to.

Syntax

Parameter Set: OnLine
Get-CrmOrganizations [-OnLineType] <OnlineType> [[-Credential] <PSCredential> ] [-DeploymentRegion] <String> [[-ProfileName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: OnPrem
Get-CrmOrganizations [-ServerUrl] <Uri> [[-Credential] <PSCredential> ] [[-HomeRealmUrl] <Uri> ] [[-ProfileName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Get-CrmOrganizations cmdlet returns a list of organizations that the current user has access to.

Parameters

-Credential<PSCredential>

User credential for signing in to .

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentRegion<String>

Geographic region of your online deployment. Valid values are NorthAmerica, EMEA, and APAC.

Aliases

none

Required?

true

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-HomeRealmUrl<Uri>

URI of the WS-Trust metadata endpoint.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-OnLineType<OnlineType>

Type of online deployment. Valid values are Office365 and LiveID. Default is Office365.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-ProfileName<String>

For internal use only.

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-ServerUrl<Uri>

URL of the discovery server specified in the following format: http://<server>:<port>

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection

    Returns an initialized array of organizations.

Examples

-------------------------- EXAMPLE 1 --------------------------

This example shows how to retrieve the organizations from an on-premises instance of and store the information in a variable, $CRMOrgs.

C:\PS>$CRMOrgs = Get-CrmOrganizations –ServerUrl http://<CRM_Server_Host> –Credential $Cred

-------------------------- EXAMPLE 2 --------------------------

This example shows how to retrieve the organizations from an online () instance of , and store the information in a variable, $CRMOrgs.

C:\PS>$CRMOrgs = Get-CrmOrganizations -Credential $Cred -DeploymentRegion NorthAmerica –OnlineType Office365

Get-CrmConnection

Use PowerShell cmdlets for XRM tooling to connect to CRM