I am making automation for refreshing CRM organization with PowerShell. I have used Microsoft.Crm.PowerShell PS Snapin command
Disable-CrmOrganization -Name DCRMTEST
and got an error message saying;
Disable-CrmOrganization : Source : mscorlib Method : HandleReturnMessage Date : 13:25:30 Time : 20.6.2017 Error : Message: The Deployment Service cannot process the request because one or more validation checks failed. ErrorCode: -2147167645 Stack Trace : ====================================================================================================================== Inner Exception Level 1 : ==DeploymentServiceFault Info========================================================================================== Error : The Deployment Service cannot process the request because one or more validation checks failed. Time : 20.6.2017 11:25:30 ErrorCode : -2147167645 Date : 13:25:30 Time : 20.6.2017 Error Items: SqlServerAgentCheck raising error : SQLSERVERAGENT (SQLSERVERAGENT) service is not running on the server SRVSQL01. ====================================================================================================================== At line:1 char:1 + Disable-CrmOrganization -Name DCRMTEST + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Crm.P...anizationCmdlet:DisableCrmOrganizationCmdlet) [Disable-CrmOrganization], FaultException`1 + FullyQualifiedErrorId : CRM Deployment Cmdlet Error,Microsoft.Crm.PowerShell.DisableCrmOrganizationCmdlet
I can disable or enable CRM organization over CRM Deployment Manager without a hassle.
I've checked that File and Printer sharing for domain is enabled, service account for CRM is local and sysadmin on SQL server and instance where CRM database is located. TCP port 445 is opened (we have no firewall rules in internal network). Also SQL Server Agent is running and set to automatic startup.
I have disabled CRM organization over CRM Deployment Manager and than tried to remove CRM organization from PowerShell with command;
Remove-CrmOrganization -Name DCRMTEST
and I had removed it succesfully without any error.
Any idea why I am getting error about SQLSERVERAGENT not running when trying to disable or enable CRM organization over PowerShell?
*This post is locked for comments