[英]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.