SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to evaluate policies on multiple servers thru SQLServerAgent job


How to evaluate policies on multiple servers thru SQLServerAgent job

Author
Message
Jayakumar Krishnan
Jayakumar Krishnan
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1374 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
Tommy Bollhofer
Tommy Bollhofer
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3796 Visits: 3359
Powershell. Have you taken a look at the EPM project?

http://www.codeplex.com/EPMFramework

Tommy

Follow @sqlscribe
lmacdonald
lmacdonald
SSC Eights!
SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)SSC Eights! (908 reputation)

Group: General Forum Members
Points: 908 Visits: 564
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search