The Get-CrmConnection cmdlet retrieves connection details for the specified Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization.
Returns Dynamics 365 Customer Engagement (on-premises) details for the Contoso organization by using a connection string rather then the OrganizationName, ServerUrl, and Credential parameters.
Parameters
-ConnectionString
Connection string used to connect to Dataverse. Valid values are:
Server/Url/ServiceUri/Service Uri: URL of the Dynamics 365 Customer Engagement (on-premises) server.
UserName/User Name/UserId/User Id: Identifier of the user used to connect.
Password: Password for the user.
Domain: Domain name for the user.
HomeRealmUri/Home Realm Uri: Home Realm URL used to access the delegated ADFS instance.
AuthType/AuthenticationType: Authentication type to use to connect with Dynamics 365 Customer Engagement (on-premises) or Dataverse. Default - value is AD. Valid values are: AD, Live, IFD, Claims, Office365, and OAuth.
RequireNewInstance: Default value is true. Use false to reuse an instance from in-memory cache.
ClientId/AppId/ApplicationId: ID of your OAuth client app. This parameter is required when you use the OAuth authentication type.
RedirectUri/ReplyUrl: Reply URL created as part of the client Id registration. This parameter is required when you use the OAuth authentication type.
TokenCacheStorePath: Fully qualified file name to store tokens for reuse. Optional when you use the OAuth authentication type.
LoginPrompt: Allow the OAuth system to present a UI for login information. Default value is Auto. Valid values are Auto, Always, Never, and RefreshSession.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ConnectionStringOnly
Position:
1
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnPrem
Position:
1
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
OnLine
Position:
1
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-DeploymentRegion
Geographic region of your Dataverse environment. Valid values are NorthAmerica, EMEA, APAC, SouthAmerica, Oceania, JPN, CAN, IND, and NorthAmerica2.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnLine
Position:
4
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-HomeRealmUrl
URI of the WS-Trust metadata endpoint.
Parameter properties
Type:
Uri
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnPrem
Position:
3
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-InteractiveMode
Enables you to use the common sign-in control dialog box to specify credentials for connecting to a Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UIOnly
Position:
0
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-MaxCrmConnectionTimeOutMinutes
Maximum number in minutes to wait before quitting the operation.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
20
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-OnLineType
Type of online service. Valid value is Office365.
Parameter properties
Type:
OnlineType
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnLine
Position:
1
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-OrganizationName
Unique or friendly name of the Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization to connect to.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnPrem
Position:
2
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
OnLine
Position:
2
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ProfileName
Can be used in conjunction with the InteractiveMode parameter to store connection information so that it can be reused in the Get-CrmConnection cmdlet the next time instead of re-entering the connection information again. You can create different profile names to save multiple connections.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OnPrem
Position:
5
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
OnLine
Position:
5
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ServerUrl
URL of the Microsoft Dynamics 365 Customer Engagement (on-premises) server specified in the format https://<server>:<port>.