PowerShell function in Policy-Based Management - by Jorge Segarra (SQLChicken)

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 585824 Comments
Status Resolved Workarounds
Type Suggestion Repros 0
Opened 8/12/2010 9:36:08 AM
Access Restriction Public


Policy-based management is a fantastic and powerful tool for administrators. As more and more companies are making their migrations to SQL Server 2008 the adoption of this feature is going to pick up steam. With Microsoft's latest products, PowerShell has been touted as one of the main tools in the administrative arsenal and is rapidly picking up adoption. That being said I would like to see PowerShell integration with PBM by adding a PowerShell function in the advanced editor of PBM.
Sign in to post a comment.
Posted by Microsoft on 10/15/2012 at 10:51 AM
This DCR is closed as won't fix for the future release of PBM. Please contact the feature team by reopening this case if the request has a higher business value.

Best Regards,
Posted by Microsoft on 3/9/2011 at 5:21 PM
Hello there,

Thank you for the feedback. In the long run, we do want to support PowerShell script. We will consider it for next major release.

Posted by Jorge Segarra (SQLChicken) on 2/13/2011 at 11:04 AM
Gianluca, I'm referring to inside the advanced expression editor. Currently there are functions for executewql and executesql. This would be used for advanced policy creation that would allow you to use the power of PowerShell from within a complex policy that would otherwise need to be done through executewql, which IMO, isn't very friendly.
Posted by Gianluca Hotz on 8/12/2010 at 12:54 PM
BTW, there's a similar item from beginning of 2009 (id 410591), was marked as being considered for future releases, but it was completely ignored (zero votes). Maybe someone from Microsoft can close the old item and leave this one open considering it has votes and momentum?
Posted by Jorge Segarra (SQLChicken) on 8/12/2010 at 12:39 PM
Thanks! I've edited the last sentence in the paragraph to clarify.
Posted by Gianluca Hotz on 8/12/2010 at 12:26 PM
Ah sorry, should have understood it from the title. Good idea.
Posted by Jorge Segarra (SQLChicken) on 8/12/2010 at 10:55 AM
I'm asking for specifically an ExecutePoSH or ExecutePowershell function in the advanced editor. So for instance one can do:

ExecutePowershell('somevalue',' ./customscript.ps)

This way you can create a PowerShell script that can calculate or do whatever it is you need, and have that value returned to the function so that it can then be evaluated via policy.
Posted by Gianluca Hotz on 8/12/2010 at 9:51 AM
I'm not sure which kind of integration you mean. I guess you mean something like a provider and/or some cmdlets. IMO you should you explain a little bit more, or the item may be closed saying you can already integrate with Invoke-PolicyEvaluation and SMO.