Verbindung zu CRM 2016 IFD in PowerShell
Ich möchte mithilfe des PowerShell-Cmdlets @ eine Verbindung zum CRM 2016-Server herstelleGet-CrmConnection
im SDK enthalten.
Ich habe Probleme, die richtige Verbindungszeichenfolge zu finden.
Verbindung mit dem Server im lokalen Netzwerk funktioniert normal:
Get-CrmConnection -ConnectionString "Url=http://<server>/OrganizationName;"
Aber die Verbindung zum für IFD konfigurierten Server schlägt fehl:
Get-CrmConnection -ConnectionString "Url=https://crm.ourdomain.com/"
Get-CrmConnection : Organization cannot be null or empty.
Parameter name: Organization Name
At line:1 char:1
+ Get-CrmConnection -ConnectionString "Url=https://crm.ourdomain.com/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SyntaxError: (:) [Get-CrmConnection], ArgumentNullException
+ FullyQualifiedErrorId : -9,Microsoft.Xrm.Tooling.CrmConnector.Powershell.Commands.GetCrmConnectionCommand
Ich habe versucht, den AuthType-Parameter in die Verbindungszeichenfolge einzufügen, wobei der Organisationsname angegeben wurde, aber kein Erfolg. Wichtig ist, dass ich mich im interaktiven Modus verbinden kann:
Get-CrmConnection -InteractiveMode
Dies gibt die folgende Verbindung zurück:
IsReady : True
IsBatchOperationsAvailable : True
Authority :
OAuthUserId :
ActiveAuthenticationType : AD
OrganizationServiceProxy : Microsoft.Xrm.Tooling.Connector.CrmWebSvc+ManagedTokenOrganizationServiceProxy
OrganizationWebProxyClient :
LastCrmError : OrganizationWebProxyClient is null
LastCrmException :
CrmConnectOrgUriActual : https://crm.ourdomain.com/XRMServices/2011/Organization.svc
ConnectedOrgFriendlyName : OrganizationName
ConnectedOrgUniqueName : OrganizationName
ConnectedOrgPublishedEndpoints : {[WebApplication, https://crm.ourdomain.com/], [OrganizationService,
https://crm.ourdomain.com/XRMServices/2011/Organization.svc],
[OrganizationDataService,
https://crm.ourdomain.com/XRMServices/2011/OrganizationData.svc]}
ConnectionLockObject : System.Object
ConnectedOrgVersion : 8.0.1.79