

Under no circu111stances will any legal responsibility or bla1ne be held against the publisher or author for any reparation, da1nages, or monetaiy loss due to the information herein, either directly or indirectly. The information provided herein is stated to be truthful ru1d consistent, iI1 that any liability, in tem1s of inattention or otherwise, by any usage or abuse of any policies, processes, or directions contained within is the solitary and utter responsibility of the recipient reader. Recording of this publication is strictly prohibited and any storage of this doctunent is not allowed tutless with '.vritten permission fro1n the author. In no vvay is it legal to reproduce, duplicate, or transmit any part of this docume11t in either electronic means or in printed format. PowerShell Function to Check the Status of a SQL Agent Job using the. Locations for Comment-based Help in PowerShell Functions Next » Task, you would at least want to first check to see if the job is running and disable the button to If you were writing a GUI to accomplish this It’s meant to show how to write a GUI to leverage your existing PowerShellįunctions so you don’t have to reinvent the wheel. The GUI shown in this blog article is a proof of concept and certainly isn’t meant to be a fullyįunctional application.

Run the executable and then click the “Run SQL Agent Job” button:

Select “Build” underneath package to create an executable: Just in case someone is able to reverse engineer the executable and retrieve the credentials. This account should be setup with the privileged of least principle On the Output Settings tab, set the Run Mode to “RunAs user” and enter the user name and password Giving those rights to their user accounts, select “Settings” underneath Package: To run this GUI as a user who has been given access to run the SQL agent jobs without actually The button simply calls the functions as needed and performs the necessary logic based on the
