How to evaluate policies on multiple servers thru SQLServerAgent job

  • I'm trying to evaluate policies on multiple servers through SQLServerAgent job. Any help?

    Thanks

    Jay

    http://www.sqldbops.com

  • Powershell. Have you taken a look at the EPM project?

    http://www.codeplex.com/EPMFramework

  • I have tried using the EPM but the documentation failed me.

    When I start Powershell through SQL server and modify the command with my parameters and paste it in to Powershell I get an error saying it can't find the drive. It seems the SL command will only work when you open up Powershell on it's own and not within SQL.

    Error:

    SL : Cannot find drive. A drive with the name 'F' does not exist.

    Running this as SQL Job it's able to find and start executing the PS script. However the job fails with the error below.

    A job step received an error at line 48 in a PowerShell script. The corresponding line is ' if (-not (Get-PSSnapin | ?{$_.name -eq 'SqlServerProviderSnapin100'}))'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'The term 'Get-PSSnapin' is not recognized as the name of a cmdlet.

    Since I do not know Powershell I am pretty suck. Anyone get past these?

    The full command I run is

    SL "F:\MSSQL\"

    .\EPM_EnterpriseEvaluation_412.ps1 -ConfigurationGroup "" -PolicyCategoryFilter "" –EvalMode “Check”

    Thanks for any help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply