{"id":33704,"date":"2016-04-21T10:54:54","date_gmt":"2016-04-21T05:24:54","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=33704"},"modified":"2016-04-21T12:06:41","modified_gmt":"2016-04-21T06:36:41","slug":"running-powershell-scripts-using-jenkins","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/","title":{"rendered":"Running Powershell scripts using Jenkins"},"content":{"rendered":"<p>Jenkins has been primarily <a title=\"devOps automation as a service\" href=\"https:\/\/2thenew.online\/devops-automation-consulting\">used for automating jobs<\/a> and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for <a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/Installing+Jenkins\">Jenkins installation. <\/a><\/p>\n<p><strong>Powershell Plugin<\/strong><\/p>\n<p>Jenkin&#8217;s Powershell plugin is a useful tool for running Powershell scripts on Windows servers via Jenkins.<\/p>\n<p><strong>Plugin installation<\/strong><\/p>\n<ul>\n<li>Login to Jenkins and navigate to <strong>Manage Jenkins &gt; Manage Plugins.<\/strong><\/li>\n<li>Click on the <strong>Available<\/strong> tab and Enter <code> PowerShell<\/code> in the filter box.<\/li>\n<li>Select the plugin showing by name PowerShell Plugin .<\/li>\n<li><strong>Download now and install after a restart<\/strong>.<\/li>\n<\/ul>\n<p>The PowerShell plugin is now installed.<\/p>\n<p>Now, let&#8217;s create a job on Jenkins as steps mentioned below:<\/p>\n<ul>\n<li>On Jenkins interface, click <strong>New Item<\/strong><\/li>\n<li>Enter Create File for the job name<code><\/code>. Select <strong>Freestyle project<\/strong><\/li>\n<li>Tick <strong>This build is parameterized<\/strong>. Expand the <strong>Add Parameter<\/strong> list and choose <strong>String Parameter<\/strong><\/li>\n<li>Again, Click the <strong>Add Parameter<\/strong> list and select <strong>Choice Parameter<\/strong>. Enter the options on new lines inside the <strong>Choices<\/strong> text box. Also, provide description for the options mentioned:<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33705\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/05_powershell_jenkins_jobs.png\" alt=\"05_powershell_jenkins_jobs\" width=\"475\" height=\"768\" \/><\/p>\n<ul>\n<li>Scroll down to the <strong>Build <\/strong>option and <strong>Add build step.<\/strong><\/li>\n<li>Select <strong>Windows PowerShell, <\/strong>inside the text box where the below Powershell script is to be supplied:<\/li>\n<\/ul>\n<p>[js]<br \/>\n# Create Temp Directory where the files will be created.<br \/>\nif (-not(Test-Path -Path &#8216;C:\\temp&#8217;))<br \/>\n{<br \/>\nNew-Item -Path &#8216;C:\\temp&#8217; -ItemType directory<br \/>\n}<\/p>\n<p># Using the environment variables configured above.<br \/>\nSet-Content -Path &quot;C:\\temp\\$($env:Filename).txt&quot; -Value $env:Message[\/js]<\/p>\n<ul>\n<li>Click <strong>Save<\/strong><\/li>\n<\/ul>\n<p>The Job has been created.<\/p>\n<h1>Running the Job:<\/h1>\n<p>Go to the Jenkins home page and execute the job just created. Executing the job will bring a form with the options provided in the parameters specified as in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33706\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/09_jenkins_powershell_job_paramaters.png\" alt=\"09_jenkins_powershell_job_paramaters\" width=\"896\" height=\"386\" \/><\/p>\n<ul>\n<li>Click <strong>Build<\/strong>.<\/li>\n<\/ul>\n<p>That&#8217;s it. Once the job is complete. A new file named <strong>Second File<\/strong> gets created in <strong>C:\\temp <\/strong>with content as <strong>This is a message from Jenkins!<\/strong><\/p>\n<p><strong>Executing Powershell scripts\/commands remotely<\/strong><\/p>\n<p>The above job creates a text file on the Jenkins server itself. To setup remote Powershell scripts we first need to configure Jenkins server for remote Powershell script execution. To enable remote Windows machine in to the WS-Man trusted list on Jenkins servers. Execute the below command on Powershell window on Jenkins server. The command will add all the remote machine to the trusted list.<\/p>\n<p><code>Set-Item WSMan:\\localhost\\Client\\TrustedHosts *<\/code><\/p>\n<p>Along with the commands, we would also need to enable remote script execution also. To enable execution of Powershell scripts remotely execute the following command in Powershell window on Jenkins server.<\/p>\n<p><code>Set-ExecutionPolicy RemoteSigned \u2013Force<\/code><\/p>\n<p>We will have to install a new plugin named EnvInject Plugin for transferring variables e.g. passwords.<\/p>\n<ul>\n<li>Login to Jenkins and navigate to <strong>Manage Jenkins &gt; Manage Plugins<\/strong><\/li>\n<li>Click on the <strong>Available<\/strong> tab and Enter <code>EnvInject<\/code> in the filter box<\/li>\n<li>Select the plugin showing by name <a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/PowerShell+Plugin\">PowerShell Plugin<\/a><\/li>\n<li>Select Download<strong> now and install after restart<\/strong><\/li>\n<\/ul>\n<p><strong>Creating a job to restart Windows time service:<\/strong><\/p>\n<ul>\n<li>On Jenkins interface, click <strong>New Item<\/strong><\/li>\n<li>Enter Remote Powershell scripts for the job name. Select <strong>Freestyle project<\/strong><\/li>\n<li>Tick <strong>This build is parameterized<\/strong>. Create following parameters\n<ul>\n<li>Type: String Parameter<\/li>\n<li>Name: ServerIp\/Hostname<\/li>\n<li>Description: Remote machine&#8217;s IP address.<\/li>\n<li>Type: String Parameter<\/li>\n<li>Name: UserName<\/li>\n<li>Type: Password Parameter<\/li>\n<li>Name: Password<\/li>\n<\/ul>\n<\/li>\n<li>Now, Click <strong>Add Parameter<\/strong> list and select the <strong>Choice Parameter<\/strong>. Enter the options on new lines inside the <strong>Choices<\/strong> text box. Also, provide description for the options mentioned:<\/li>\n<\/ul>\n<p>[js]# Configure build failure on errors on the remote machine similar to set -x on bash script<br \/>\n$ErrorActionPreference = &#8216;Stop&#8217;<\/p>\n<p># Create a PSCredential Object using the &quot;Username&quot; and &quot;Password&quot; variables created on job<br \/>\n$Password = $env:Password | ConvertTo-SecureString -AsPlainText -Force<br \/>\n$creddentials = New-Object System.Management.Automation.PSCredential -ArgumentList $env:UserName, $Password<\/p>\n<p>.<br \/>\n# It depends on the type of job you are executing on the remote machine as to if you want to use &quot;-ErrorAction Stop&quot; on your Invoke-Command.<br \/>\nInvoke-Command -ComputerName $env:Computer -Credential $credentials -ScriptBlock {<br \/>\nRestart-Service -Name W32Time<br \/>\n}[\/js]<\/p>\n<p>Run the build and check the Windows logs on remote computer specified to verify if the Windows Time service has got restarted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin&#8217;s Powershell plugin [&hellip;]<\/p>\n","protected":false},"author":563,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":115,"footnotes":""},"categories":[2348,1],"tags":[3215,1682,3213,3216,3214,3212,472,3218,3217],"class_list":["post-33704","post","type-post","status-publish","format-standard","hentry","category-devops-technology","category-technology","tag-build-windows-powershell-scripts-using-jenkins","tag-jenkins","tag-jenkins-with-windows","tag-powershell-plugin-jenkins","tag-powershell-scripts","tag-poweshell","tag-windows","tag-windows-jenkins","tag-windows-with-jenkins"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin&#039;s Powershell plugin\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Rahul Kumar Jaiswal\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Running Powershell scripts using Jenkins | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin&#039;s Powershell plugin\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Running Powershell scripts using Jenkins | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin&#039;s Powershell plugin\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#article\",\"name\":\"Running Powershell scripts using Jenkins | TO THE NEW Blog\",\"headline\":\"Running Powershell scripts using Jenkins\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rahul-3\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2016\\\/04\\\/05_powershell_jenkins_jobs.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#articleImage\"},\"datePublished\":\"2016-04-21T10:54:54+05:30\",\"dateModified\":\"2016-04-21T12:06:41+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#webpage\"},\"articleSection\":\"DevOps, Technology, build windows powershell scripts using jenkins, Jenkins, jenkins with windows, powershell plugin jenkins, powershell scripts, Poweshell, windows, windows jenkins, windows with jenkins\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#listItem\",\"name\":\"Running Powershell scripts using Jenkins\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#listItem\",\"position\":3,\"name\":\"Running Powershell scripts using Jenkins\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rahul-3\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rahul-3\\\/\",\"name\":\"Rahul Kumar Jaiswal\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/8d045d56-1367-4c00-ae9f-0263f53917fc_1337-Rahul-Kumar-Jaiswal-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Rahul Kumar Jaiswal\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/\",\"name\":\"Running Powershell scripts using Jenkins | TO THE NEW Blog\",\"description\":\"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin's Powershell plugin\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/running-powershell-scripts-using-jenkins\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rahul-3\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rahul-3\\\/#author\"},\"datePublished\":\"2016-04-21T10:54:54+05:30\",\"dateModified\":\"2016-04-21T12:06:41+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Running Powershell scripts using Jenkins | TO THE NEW Blog","description":"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin's Powershell plugin","canonical_url":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#article","name":"Running Powershell scripts using Jenkins | TO THE NEW Blog","headline":"Running Powershell scripts using Jenkins","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/rahul-3\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/05_powershell_jenkins_jobs.png","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#articleImage"},"datePublished":"2016-04-21T10:54:54+05:30","dateModified":"2016-04-21T12:06:41+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#webpage"},"articleSection":"DevOps, Technology, build windows powershell scripts using jenkins, Jenkins, jenkins with windows, powershell plugin jenkins, powershell scripts, Poweshell, windows, windows jenkins, windows with jenkins"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.online\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#listItem","name":"Running Powershell scripts using Jenkins"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#listItem","position":3,"name":"Running Powershell scripts using Jenkins","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/rahul-3\/#author","url":"https:\/\/2thenew.online\/blog\/author\/rahul-3\/","name":"Rahul Kumar Jaiswal","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/8d045d56-1367-4c00-ae9f-0263f53917fc_1337-Rahul-Kumar-Jaiswal-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Rahul Kumar Jaiswal"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#webpage","url":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/","name":"Running Powershell scripts using Jenkins | TO THE NEW Blog","description":"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin's Powershell plugin","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/rahul-3\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/rahul-3\/#author"},"datePublished":"2016-04-21T10:54:54+05:30","dateModified":"2016-04-21T12:06:41+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Running Powershell scripts using Jenkins | TO THE NEW Blog","og:description":"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin's Powershell plugin","og:url":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Running Powershell scripts using Jenkins | TO THE NEW Blog","twitter:description":"Jenkins has been primarily used for automating jobs and tasks on Linux servers. In this blog, we will be configuring Jenkins to execute Powershell scripts on Windows. This blog will not be covering Jenkins server set up steps on Windows. You can refer to the following link for Jenkins installation. Powershell Plugin Jenkin's Powershell plugin","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"33704","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 12:15:28","updated":"2024-02-29 08:23:50","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRunning Powershell scripts using Jenkins\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Technology","link":"https:\/\/2thenew.online\/blog\/category\/technology\/"},{"label":"Running Powershell scripts using Jenkins","link":"https:\/\/2thenew.online\/blog\/running-powershell-scripts-using-jenkins\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/33704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/563"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=33704"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/33704\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=33704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=33704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=33704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}