How to create Policies using PowerShell scripts

  • Jayakumar Krishnan

    SSCarpal Tunnel

    Points: 4710

    Comments posted to this topic are about the item How to create Policies using PowerShell scripts

  • SQLRNNR

    SSC Guru

    Points: 281210

    Thanks for taking the time to share what you have learned with the community.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • brion

    Grasshopper

    Points: 11

    Greetings! It is always a gesture of grace to contribute knowledge to a community of those who can most use it. I wish to just comment about the text itself. Please do not take this as offensive, or in any negative way. I have always been a mentor and a part of solutions, not the problem. So if you will...

    May I suggest that if the original text was in a language other than English, that the person who is responsible for translation, pay closer attention to the results. Otherwise, may I suggest that the author be more diligent about proofreading the material.

    I feel very strongly that the author is a very talented and knowledgeable individual; and even more praise is due for his efforts to help others in their endeavors. However, I also strongly believe that the audience is soon daunted by trying to translate the article, (at least grammatically), and therefore would quickly lose interest in completing the reading of the article. It is noble and kind to help, but it is tragic to consider that these efforts go to waste because they’re simply too difficult to read with any degree of continuity.

  • Jayakumar Krishnan

    SSCarpal Tunnel

    Points: 4710

    Thanks for your comments & is helpful to correct my writing skills brion. Also for your information, it is not been translated from any other sources, I've written this script and got help from diffrenent resources to resolve the issues on the script. The script which I created was working fine when I execute it inside the Powershell window but the same script if you call it from DOS prompt it thrown error due to missing libraries, which Sethu helped to resolved.

    Anyway thanks again for your comments...

  • mcvilbar

    Say Hey Kid

    Points: 701

    I have some few questions to the author with regards to the windows powershell scripts:

    1) Can we integrate the powershell scripts to the Policy Management or shall I say can we add this script using the GUI in policy management?

    2)How can we implement a policy in powershell script that upon creation of a certain store procedure which does not conforms to the performance best practices it will autmatically returned error and it shall not be created?

    🙂 Thanks.

  • Jayakumar Krishnan

    SSCarpal Tunnel

    Points: 4710

    Sorry for the delayed answer.

    1) Can we integrate the powershell scripts to the Policy Management or shall I say can we add this script using the GUI in policy management?

    [Answer]Per my knowledge, there is no option to integrate the powershell scripts in the PBM because the facets are predefined and can not be modified.

    2)How can we implement a policy in powershell script that upon creation of a certain store procedure which does not conforms to the performance best practices it will autmatically returned error and it shall not be created?

    [Answer]If I understood your question correctly, the answer is no, the policies can evaluate the created objects and defined facets.

Viewing 6 posts - 1 through 6 (of 6 total)

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