< Back

Get-CrmOrganizations

Sat Jan 18, 2020 4:00 pm

NAME Get-CrmOrganizations



SYNOPSIS

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





SYNTAX

Get-CrmOrganizations [[-Credential] <PSCredential>] [[-HomeRealmUrl] <Uri>] [[-ProfileName] <String>] [-Confirm]

[-WhatIf] [<CommonParameters>]



Get-CrmOrganizations [[-Credential] <PSCredential>] [-OnLineType] <OnlineType> [-DeploymentRegion] <String>

[[-ProfileName] <String>] [-Confirm] [-WhatIf] [<CommonParameters>]





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.



Required? false

Position? 2

Default value

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, CAN, IND, or NorthAmerica2.



Required? true

Position? 5

Default value

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-HomeRealmUrl <Uri>

URI of the WS-Trust metadata endpoint.



Required? false

Position? 4

Default value

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-OnLineType <OnlineType>

Type of online deployment. Valid value is Office365.



Required? true

Position? 2

Default value

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-ProfileName <String>

For internal use only.



Required? false

Position? 6

Default value

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS

Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection



Returns an initialized array of CRM organizations.





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



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



This example shows how to retrieve the organizations from an on-premises instance of CRM and store the information

in a variable, $CRMOrgs.

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



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



This example shows how to retrieve the organizations from an online (Office 365) instance of CRM, and store the

information in a variable, $CRMOrgs.



RELATED LINKS

Online version: https://technet.microsoft.com/library/dn756300.aspx