Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to evaluate policies on multiple servers thru SQLServerAgent job Expand / Collapse
Author
Message
Posted Tuesday, December 15, 2009 2:07 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Sunday, November 8, 2015 5:54 PM
Points: 418, Visits: 809
I'm trying to evaluate policies on multiple servers through SQLServerAgent job. Any help?

Thanks
Jay
http://www.sqldbops.com



Thanks
Jay
http://www.sqldbops.com
Post #834752
Posted Tuesday, December 15, 2009 2:21 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 1:30 PM
Points: 1,160, Visits: 3,327
Powershell. Have you taken a look at the EPM project?

http://www.codeplex.com/EPMFramework


Tommy

Post #834755
Posted Tuesday, September 22, 2015 12:47 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, April 13, 2016 11:06 AM
Points: 103, Visits: 484
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.
Post #1721898
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse