{"id":303,"date":"2019-03-04T20:04:28","date_gmt":"2019-03-04T20:04:28","guid":{"rendered":"http:\/\/michaelschultz.net\/tech\/?p=303"},"modified":"2019-03-04T20:04:38","modified_gmt":"2019-03-04T20:04:38","slug":"configmgr-run-script-set-service-state","status":"publish","type":"post","link":"https:\/\/michaelschultz.net\/tech\/configmgr-run-script-set-service-state\/","title":{"rendered":"ConfigMgr Run Script &#8211; Set Service State"},"content":{"rendered":"\n<p>As you can tell, many of my script posts occur after something was needed at work and I ended scripting it.  This time we needed to alter the startup of a service on a group of systems. I wrote this PowerShell script to set the startup type and status of a specified service.  It does require three parameters: service name, startup type desired, and desired status.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><\/p>\n\n\n\n<p>Script is available in my GitHub repository at <a href=\"https:\/\/github.com\/NecroMonkey\/vault\/blob\/master\/ConfigMgr-Run-Scripts\/set-service-state.ps1\">https:\/\/github.com\/NecroMonkey\/vault\/blob\/master\/ConfigMgr-Run-Scripts\/set-service-state.ps1<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you can tell, many of my script posts occur after something was needed at work and I ended scripting it. This time we needed to alter the startup of a service on a group of systems. I wrote this PowerShell script to set the startup type and status of a specified service. It does &hellip; <a href=\"https:\/\/michaelschultz.net\/tech\/configmgr-run-script-set-service-state\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ConfigMgr Run Script &#8211; Set Service State&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,14,16,13],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-configmgr","category-powershell","category-run-script","category-scripting"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p98a2r-4T","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":2,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":305,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/303\/revisions\/305"}],"wp:attachment":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}