< Back
Connect-CrmOnPremDiscovery
Post
NAME Connect-CrmOnPremDiscovery
SYNOPSIS
Retrieves all CRM OnPrem orgs you belong to, let you select which organization to login, then returns connection
information.
SYNTAX
Connect-CrmOnPremDiscovery [-Credential <PSCredential>] -ServerUrl <Uri> [-OrganizationName <String>]
[-HomeRealmUrl <String>] [<CommonParameters>]
Connect-CrmOnPremDiscovery [-InteractiveMode <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Connect-CrmOnPremDiscovery cmdlet lets you retrieve all CRM OnPrem Organization you belong to, let you select
which organization to login, then returns connection information.
You can use Get-Credential to create Credential information, or you can simply invoke Connect-CrmOnlineDiscovery
which prompts you to enter username/password.
PARAMETERS
-Credential <PSCredential>
A PS-Credential. You can invoke Get-Credential.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ServerUrl <Uri>
A Url of OnPrem Dynamics CRM Server.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OrganizationName <String>
An Organization Unique Name
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HomeRealmUrl <String>
To specify HomeRealm when you use Claim Authentication with Multiple STS.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InteractiveMode [<SwitchParameter>]
Switch to launch a wpf dialog to discover and connect to CRM Online instances.
Required? false
Position? named
Default value
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
NOTES
-------------------------- Example 1 --------------------------
Connect-CrmOnPremDiscovery
Supply values for the following parameters:
ServerUrl: http://crm2015:5555
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters
[0] CRM (http://crm2015:5555/CRM)
[1] CRM2 (http://crm2015:5555/CRM2)
Select CRM Organization by index number: 0
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
This example asks you to enter ServerUrl and prompts for username/password, displays all CRM organization, and
returns connection.
-------------------------- Example 2 --------------------------
PS C:\\>$cred = Get-Credential
PS C:\\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555
This example passes credential and ServerUrl. Displays all CRM organization, and returns connection.
[0] CRM (http://crm2015:5555/CRM)
[1] CRM2 (http://crm2015:5555/CRM2)
Select CRM Organization by index number: 0
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
-------------------------- Example 3 --------------------------
PS C:\\>$cred = Get-Credential
PS C:\\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555 -OrganizationName CRM
This example passes credential, ServerUrl and Organization Unique Name. It does not prompt you at all and returns
connection.
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
-------------------------- Example 4 --------------------------
PS C:\\>Connect-CrmOnPremDiscovery -InteractiveMode
This example shows how to use -InteractiveMode switch. By specifying the switch, you can login via GUI tool.
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
RELATED LINKS
SYNOPSIS
Retrieves all CRM OnPrem orgs you belong to, let you select which organization to login, then returns connection
information.
SYNTAX
Connect-CrmOnPremDiscovery [-Credential <PSCredential>] -ServerUrl <Uri> [-OrganizationName <String>]
[-HomeRealmUrl <String>] [<CommonParameters>]
Connect-CrmOnPremDiscovery [-InteractiveMode <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Connect-CrmOnPremDiscovery cmdlet lets you retrieve all CRM OnPrem Organization you belong to, let you select
which organization to login, then returns connection information.
You can use Get-Credential to create Credential information, or you can simply invoke Connect-CrmOnlineDiscovery
which prompts you to enter username/password.
PARAMETERS
-Credential <PSCredential>
A PS-Credential. You can invoke Get-Credential.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ServerUrl <Uri>
A Url of OnPrem Dynamics CRM Server.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OrganizationName <String>
An Organization Unique Name
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HomeRealmUrl <String>
To specify HomeRealm when you use Claim Authentication with Multiple STS.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InteractiveMode [<SwitchParameter>]
Switch to launch a wpf dialog to discover and connect to CRM Online instances.
Required? false
Position? named
Default value
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
NOTES
-------------------------- Example 1 --------------------------
Connect-CrmOnPremDiscovery
Supply values for the following parameters:
ServerUrl: http://crm2015:5555
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters
[0] CRM (http://crm2015:5555/CRM)
[1] CRM2 (http://crm2015:5555/CRM2)
Select CRM Organization by index number: 0
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
This example asks you to enter ServerUrl and prompts for username/password, displays all CRM organization, and
returns connection.
-------------------------- Example 2 --------------------------
PS C:\\>$cred = Get-Credential
PS C:\\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555
This example passes credential and ServerUrl. Displays all CRM organization, and returns connection.
[0] CRM (http://crm2015:5555/CRM)
[1] CRM2 (http://crm2015:5555/CRM2)
Select CRM Organization by index number: 0
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
-------------------------- Example 3 --------------------------
PS C:\\>$cred = Get-Credential
PS C:\\>Connect-CrmOnPremDiscovery -Credential $cred -ServerUrl http://crm2015:5555 -OrganizationName CRM
This example passes credential, ServerUrl and Organization Unique Name. It does not prompt you at all and returns
connection.
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
-------------------------- Example 4 --------------------------
PS C:\\>Connect-CrmOnPremDiscovery -InteractiveMode
This example shows how to use -InteractiveMode switch. By specifying the switch, you can login via GUI tool.
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : http://crm2015:5555/CRM/XRMServices/201 ... zation.svc
ConnectedOrgFriendlyName : CRM
ConnectedOrgUniqueName : CRM
ConnectedOrgPublishedEndpoints : {[WebApplication, http://crm2015:5555/CRM], [OrganizationService,
http://crm2015:5555/CRM/XRMServices/201 ... zation.svc],
[OrganizationDataService,
http://crm2015:5555/CRM/XRMServices/201 ... onData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 7.0.0.3543
RELATED LINKS