简体   繁体   English

禁用组织时 Microsoft CRM Dynamics 2011 PowerShell 错误

[英]Microsoft CRM Dynamics 2011 PowerShell Error when disabling an organization

Whenever I try the following line in a powershell script :每当我在 powershell 脚本中尝试以下行时:

Disable-CrmOrganization -Name MyOrganization

I get the following error :我收到以下错误:

Disable-CrmOrganization : The Deployment Service cannot process the request because one or more validation checks failed.
+ Disable-CrmOrganization <<<<  -Name MyOrganization
    + CategoryInfo          : NotSpecified: (:) [Disable-CrmOrganization], FaultException`1
    + FullyQualifiedErrorId : System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFaul
   t, Microsoft.Crm.PowerShell, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.Crm.Pow
  erShell.DisableCrmOrganizationCmdlet

However, if I manually disable the organization, I am able to execute the following line with no problem :但是,如果我手动禁用该组织,则可以毫无问题地执行以下行:

Remove-CrmOrganization -Name MyOrganization

Any idea why I cannot disable the organization with powershell?知道为什么我不能用 powershell 禁用组织吗?

You might have run across this page: Use PowerShell to Call the Deployment Web Service for the CRM PowerShell references.您可能已经浏览过此页面: 使用 PowerShell 调用部署 Web 服务以获取 CRM PowerShell 参考。

Running this command gives additional error details: $error[0].Exception.Detail.ErrorDetails运行此命令会提供其他错误详细信息: $error[0].Exception.Detail.ErrorDetails

Additionally the Windows Application Event Log was showing an error (in my case anyway):此外,Windows 应用程序事件日志显示错误(在我的情况下):

Web service request FindItems to Report Server http://myserver/reportserver/ReportService2005.asmx failed with SoapException. Web 服务请求 FindItems 到报表服务器http://myserver/reportserver/ReportService2005.asmx失败并出现 SoapException。 Error: The permissions granted to user 'NT AUTHORITY\\NETWORK SERVICE' are insufficient for performing this operation.错误:授予用户“NT AUTHORITY\\NETWORK SERVICE”的权限不足以执行此操作。

Which lead me to this post: http://social.microsoft.com/Forums/en/crm/thread/0dd4a41b-eeba-405c-9b56-c32bfedb9e7a这让我看到这篇文章: http : //social.microsoft.com/Forums/en/crm/thread/0dd4a41b-eeba-405c-9b56-c32bfedb9e7a

The solution was to run the CrmDeploymentServiceAppPool under an account with elevated priviledges.解决方案是在具有提升权限的帐户下运行 CrmDeploymentServiceAppPool。 Logon as a service and sysadmin in SQL Server according to the post.根据帖子在 SQL Server 中作为服务和 sysadmin 登录。

How to enable tracing in Microsoft Dynamics CRM如何在 Microsoft Dynamics CRM 中启用跟踪

当我执行 2 次它工作所以尝试: try { Disable-CrmOrganization -Name "oragnization_name" }catch { Disable-CrmOrganization -Name "oragnization_name" }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft Dynamics CRM的PowerShell cmdlet中的内部服务器错误 - Internal Server Error in PowerShell cmdlets for Microsoft Dynamics CRM 自动化从Dynamics CRM 2011导出默认解决方案的过程 - Automate the process of exporting the default solution from Dynamics CRM 2011 通过Powershell与应用程序用户在线连接到Dynamics CRM - Connect with Powershell to Dynamics CRM online with application user 是否可以使用Powershell添加和配置Dynamics CRM工作流程 - Is it possible to add and configure Dynamics CRM workflows with Powershell 如何在 Linux PowerShell 上安装 Microsoft CRM 模块? - How to install Microsoft CRM modules on Linux PowerShell? 使用Powershell的Dynamics CRM Online V 9部署软件包-问题 - Dynamics CRM online V 9 Deploy packages using powershell - issues Powershell Dynamics CRM,如何向用户添加两个队列 - Powershell Dynamics CRM, how to add two queues to a user 为Microsoft SharePoint添加PowerShell管理单元时出错 - Error when adding powerShell snapins for Microsoft SharePoint 调用新对象时构造函数上的 Microsoft DacServices Powershell 错误 - Microsoft DacServices Powershell error on constructor when calling new-object 使用 PSSession 和 Microsoft.Exchange.Management.PowerShell.SnapIn 时出错 - Error when using PSSession and Microsoft.Exchange.Management.PowerShell.SnapIn
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM