This project has moved. For the latest updates, please go here.

Connect-CrmDeployment

Synopsis

Connect to a Dynamics CRM Deployment

Syntax

Connect-CrmDeployment [-Region] <String> [-Credential] <PSCredential> [<CommonParameters>]

Connect-CrmDeployment [-DiscoveryUrl] <Uri> [[-Credential] <PSCredential>] [<CommonParameters>]

Description

The Connect-CrmDeployment cmdlet connects and authenticates with a Dynamics CRM Deployment. This can by an on-premises or Office365 deployment.
This cmdlet only has to be run once within a session. All other cmdlets use the established connection.

Parameters

-Region <String>

The region of the Office365 subscription to connect to. This is used to build the Discovery URL. Values can be 'crm', 'crm1' .. 'crm9'.

Required? True
Position? 1
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Credential <PSCredential>

The credentials used to connect to the deployment. Can be left empty for on-premises deployments not using CBA. In this case the current Windows user credentials are used.

Required? True
Position? 2
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-DiscoveryUrl <Uri>

The URL to the discovery service for an on-premises deployment. Can be the complete URL, or the main URL of the deployment.

Required? True
Position? 1
Default value  
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

Outputs

Microsoft.Xrm.Sdk.Discovery.OrganizationDetail

Notes

Examples

Connect to on-premises deployment

PS C:\> Connect-CrmDeployment -DiscoveryUrl https://crm.amsoftware.nl/ -Authentication IFD -Credential (Get-Credential)

This command connects to an on-premises Dynamics CRM Deployment.

Connect to Office365 deployment

PS C:\> Connect-CrmDeployment -Region crm4 -Credential (Get-Credential)

This command connects to an Office365 Dynamics CRM Deployment in the Region 'Europe', and asks for credentials

Related links

OrganizationDetail Class https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.discovery.organizationdetail.aspx

Last edited Mar 11 at 7:02 PM by amsoftware, version 3