Please enable Javascript for better experience...
 
Learn Jenkins - How to Run PowerShell scripts using Jenkins?
By Pranay Jha | Jun 5, 2020 | In Articles | Total Views [ 2469 ]
(0 Like)
Rate

There are lot of challenges in environment when you use a script and always miss to schedule or park it for later use. Here Jenkins will give you this option to configure once and use everytime. I am used to of using PowerCLI for doing Day 2 Day operational tasks. Everytime I save script in a folder a strugle to find next time when I have same kind of requirement. Even, if my team members want to use the same script and if they don't have scripting skills, they find hard to use any automation. Jenkins help in this scenario as well. You can simply create a task for specific script and your team members have to just click on a button to execute in future. In this blog, I am going to explain the use of Jenkins to run PowerShell Script and fetch the report. Let'se see step by step below.


Step by Step to Run PowerShell Script using Jenkins

Login to Jenkins port using URL. Default URL is http://localhost:8080

Click on Create New Jobs.

Give name of Job. Select "Freestyle Project", and Click on OK.

Click on Job and provide description.

Scroll down and goto Build. Click on that and you will find many options. Select PowerShell.

Copy you PowerShell script here. Here I am using small script to create a directory and show host name. Click on Save

Click on Build Now.

Script is running and it will fetch information.

Click on Console Output to see the report.


Thanks for visiting here. Share this article if you found it useful.
Like Facebook Page https://www.facebook.com/VMwareInsight/
Connect to twitter https://twitter.com/imPranayK
Subscribe my Channel https://www.youtube.com/vmwareinsight
Connect over Linkedin https://in.linkedin.com/in/impranayk
Share this on Social Media

About the Author

Pranay Jha
Pranay Jha
Founder, Contributer VMwareInsight.com

Public profile: user/profile/99900000


Follow me

facebook linkedin twitter G+ VMTN youtube

Thank you for visiting my profile. I am Pranay Jha, bring along a total of 11+ years of extensive experience with me in Information Technology sector for organizations from small business to large enterprises, wherein my current assignment I am associated with IBM as a Technical Solution Architect for Virtualization platform. I am vExpert x 3 (16/17/18), VCIX-DCV, VCAP5/6-DCD, VCAP5-DCA, VCP7-CMA, VCP5/6-DCV, VCA-DCV, VCA-Cloud, VSP, VCE-CIA, MCITP, MCSE, MCSA(Messaging). I am also an Independent blogger and founder of http://vmwareinsight.com and https://cloudpathshala.com. I can be reached via email at pranay1988jha@gmail.com or Direct Message via Contact Us form.

 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment
 
Sponsors
 
 
 
 
 
Facebook Likes