Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Exporting CRM Solution Error

Posted on by Microsoft Employee

I want to export a Dynamics CRM 365 solution. Tools like the ALM Toolkit e.g. didn't worked.

My Questions:

1) Is it possible to export the entire CRM365 solution by powershell at all?

2) If it is not possible by powershell - is it possible by c#?

I can connect to the crm withouth problems by powershell. But If I try to call

When I call this:

$domain = "https://mypath.com"
$username = "user"
$password = "password"
$secPassword = New-Object -TypeName System.Security.SecureString
$password.ToCharArray() | ForEach-Object {$secPassword.AppendChar($_)}
$credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secPassword

$conn = Get-CrmConnection -Url "https://mypath.com" -Credential $credentials 
$exportPath = "C:\Users\xy\Data"
Import-Module "C:\Users\xy\Scripts\Adxstudio.Xrm.PowerShell\Adxstudio.Xrm.PowerShell.dll"
Export-CrmContent -Connection $conn -OutputPath $exportPath -Uncompressed -Generalized

I get the following error:
Export-CrmContent : Metadata Contains A Reference That Cannot Be Resolved: "mypath/.../Organization.svc".
In C:\Users\my.ps1:14 Char:1
+ Export-CrmContent -Connection $conn -OutputPath $exportPath -Uncompre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Export-CrmContent], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Adxstudio.Xrm.PowerShell.Cmdlets.ExportCrmContent

But if I set up the $conn by using this:
$conn= Get-CrmConnection -OrganizationName MyOrg -DeploymentRegion MyRegion -OnLineType Office365 -Credential $credentials 
I can get the organizations without problems. But when I try to call the export method with this connection I get:
The Parameter "$conn" cannot be bound. The value "Microsoft.Xrm.Tooling.Connector.CrmServiceClient" of the type "Microsoft.Xrm.Tooling.Connector.CrmServiceClient" can't be converted to "Adxstudio.Xrm.PowerShell.Cmdlets.PsCrmConnection".


Are there any ideas to solve one of the both problems to export the crm solution?

*This post is locked for comments

  • Jason M. Cosman Profile Picture
    Jason M. Cosman 5,234 on at
    RE: Exporting CRM Solution Error

    Hello Sampa;

    The ALM Toolkit used to provide this functionality but i know it's out of date for sure. I'm not 100% sure if theses tools will assist but these are on the forfront of both build automation and powershell components.

    marketplace.visualstudio.com/items

    and

    https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Exporting CRM Solution Error

    Hi Sampa

    You may consult Tenfold for any integration issues. Tenfold is a great CTI solution that offers integration over 150 more CRM and phone systems. It's easy to set up and will only take a few minutes. They support MS Dynamics integration. You can check out their integrations list here www.tenfold.com/.../dynamics

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans