1
我想導出Dynamics CRM 365解決方案。像ALM Toolkit這樣的工具,例如沒有工作。Dynamics CRM導出解決方案(非本地)
我的問題:
1)是否有可能將整個CRM365解決方案通過PowerShell的所有出口?
2)如果這是不可能的powershell - 是否有可能通過C#?
我可以通過PowerShell連接到沒有問題的crm。但是,如果我嘗試調用
當我把這叫做:
$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
我收到以下錯誤:
Export-CrmContent : Metadata Contains A Reference That Cannot Be Resolved: "https://mypath/XRMServices/2011/Organization.svc?wsdl=wsdl0".
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
但如果我設置了$康恩利用這一點:
$conn= Get-CrmConnection -OrganizationName MyOrg -DeploymentRegion MyRegion -OnLineType Office365 -Credential $credentials
我可以讓組織沒有問題。但是,當我嘗試調用與此連接的導出方法獲得:
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".
是否有任何想法,解決了這兩個問題導出的CRM解決方案呢?