March 13, 2018 at 4:44 am
Hi all
I am trying to set up EPM in my environment to help manage policy based management in by SQL estate. I've seen this working in a previous organisation but that was on SQL 2012. Does anyone know if it works with SQL 2016 on Windows 2012? I am getting an error when trying to execute the powershell script via the SQL Agent job:
Message
Executed as user: ASCOTUW\CMSProxyPS. A job step received an error at line 65 in a PowerShell script. The corresponding line is '$PolicyStore = new-object Microsoft.SqlServer.Management.DMF.PolicyStore($conn); '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling ".ctor" with "1" argument(s): "Microsoft.SqlServer.Management.Dmf.PolicyObject is not derived from EnumObject." Microsoft.SqlServer.Management.Dmf.PolicyObject is not derived from EnumObject. '. Process Exit Code -1. The step failed.
Any thoughts?
March 14, 2018 at 3:46 pm
doodlingdba - Tuesday, March 13, 2018 4:43 AMHi all
I am trying to set up EPM in my environment to help manage policy based management in by SQL estate. I've seen this working in a previous organisation but that was on SQL 2012. Does anyone know if it works with SQL 2016 on Windows 2012? I am getting an error when trying to execute the powershell script via the SQL Agent job:Message
Executed as user: ASCOTUW\CMSProxyPS. A job step received an error at line 65 in a PowerShell script. The corresponding line is '$PolicyStore = new-object Microsoft.SqlServer.Management.DMF.PolicyStore($conn); '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling ".ctor" with "1" argument(s): "Microsoft.SqlServer.Management.Dmf.PolicyObject is not derived from EnumObject." Microsoft.SqlServer.Management.Dmf.PolicyObject is not derived from EnumObject. '. Process Exit Code -1. The step failed.Any thoughts?
The current version has been tested through SQL Server 2014. Nonetheless, I'd make sure you are on the latest version:
EMP-Framework
Sue
March 15, 2018 at 4:02 am
I am using the latest version (4.0) but when running the job i am getting this:
March 15, 2018 at 1:52 pm
doodlingdba - Thursday, March 15, 2018 4:02 AMI am using the latest version (4.0) but when running the job i am getting this:
The error is when creating the PolicyStore object. Check whatever you are providing for the Central Management Server. It showing you the line with the error:
$PolicyStore = new-object Microsoft.SqlServer.Management.DMF.PolicyStore($conn)
The $conn variable is the connection to the Central Management Server.
Sue
March 27, 2018 at 10:03 am
Thanks Sue. The CMS server was correct. Not really sure what that error meant but I managed to get around this by calling the script using powershell.exe, using the following command:
powershell.exe c:\EPM\EPM_EnterpriseEvaluation_4.ps1 -ConfigurationGroup LIVE <-- where LIVE is the parameter value.
This works from the SQL Agent job as well.
So for readers out there, I can confirm that EPM works with SQL 2016! 🙂
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply