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


How to create Policies using PowerShell scripts


How to create Policies using PowerShell scripts

Author
Message
Jayakumar Krishnan
Jayakumar Krishnan
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1434 Visits: 809
Comments posted to this topic are about the item How to create Policies using PowerShell scripts

Thanks
Jay
http://www.sqldbops.com
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66843 Visits: 18570
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

brion
brion
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 2
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
Jayakumar Krishnan
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1434 Visits: 809
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...

Thanks
Jay
http://www.sqldbops.com
mcvilbar
mcvilbar
SSC Veteran
SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)

Group: General Forum Members
Points: 242 Visits: 120
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
Jayakumar Krishnan
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1434 Visits: 809
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.

Thanks
Jay
http://www.sqldbops.com
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