Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Get-CrmConnection doesn't work in Powershell for Dynamic 365 Online 9.0 Version !!!

Posted on by Microsoft Employee

Hi guys,

I am trying to get connection in powershell "Get-CrmConnection" for Dynamic 365 Online Instance (Version 9.0) but unfortunately without any success. I've tried SDK version 8.2 for  old instance  (8.2 Version), which works fine. Any suggestion or do you experience the same ? Thanks for help in advance. 

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get-CrmConnection doesn't work in Powershell for Dynamic 365 Online 9.0 Version !!!

    Please use this code

    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

    $conn = Get-CrmConnection  -OrganizationName $organizationName -DeploymentRegion CAN –OnlineType Office365  -Credential $Cred  

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get-CrmConnection doesn't work in Powershell for Dynamic 365 Online 9.0 Version !!!

    Hi Aric,

    Here is the message what I am getting.

    cmdlet Get-Credential at command pipeline position 1

    Supply values for the following parameters:

    Microsoft.Xrm.Tooling.CrmConnector.PowerShell\Get-CrmConnection : More then one org was returned, retry with an exact org name

    At line:3 char:11

    + $crmOrg = Microsoft.Xrm.Tooling.CrmConnector.PowerShell\Get-CrmConnec ...

    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : InvalidData: (:) [Get-CrmConnection], Exception

       + FullyQualifiedErrorId : -2,Microsoft.Xrm.Tooling.CrmConnector.Powershell.Commands.GetCrmConnectionCommand

    IsReady                        : False

     

     

    I've also tried to use InteractiveMode but it's just list all organization and redirect to login page seems to be hanging out. But I can log in to Dynamic 365 instance without July Update (8.2.x.x). Thank you for any suggestions in advance. Mike 

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Get-CrmConnection doesn't work in Powershell for Dynamic 365 Online 9.0 Version !!!

    Are you using the SDK v9 assembly files?

    Can you please share any errors that you are getting that can help troubleshoot the issue...

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans