Get-CrmOrganizations

Applies To: CRM 2015 on-prem

Get-CrmOrganizations

Returns a list of Microsoft Dynamics CRM 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 [[-Credential] <PSCredential> ] [[-HomeRealmUrl] <Uri> ] [[-ProfileName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

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

This cmdlet applies to Microsoft Dynamics CRM Online and on-premises versions of Microsoft Dynamics CRM.

Parameters

-Credential<PSCredential>

User credential for signing in to Microsoft Dynamics CRM.


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 Microsoft Dynamics CRM online deployment. Valid values are NorthAmerica, EMEA, APAC, SouthAmerica, Oceania, JPN, and NorthAmerica2.


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

-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 (http://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 CRM organizations.


Examples

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

This example shows how to retrieve the organizations from an on-premises instance of CRM 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 (Office 365) instance of CRM, and store the information in a variable, $CRMOrgs.


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

Related topics

Community Additions

ADD
Show: