{"id":131,"date":"2009-06-17T10:36:00","date_gmt":"2009-06-17T15:36:00","guid":{"rendered":"http:\/\/www.bhargavs.com\/index.php\/powershell\/2009\/06\/powershell-get-service-startuptype\/"},"modified":"2009-06-17T10:36:00","modified_gmt":"2009-06-17T15:36:00","slug":"powershell-get-service-startuptype","status":"publish","type":"post","link":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/","title":{"rendered":"Get-Service StartupType"},"content":{"rendered":"<p>If you want to find out startup type of a service using Get-Service cmdlet, you are out of luck. Get-Service cmdlet does not have StartupType property. Set-Service however does. So how can you find out the startup type of a service using powershell?<\/p>\n<p>You can use Get-WmiObject.<\/p>\n<pre lang=\"PowerShell\">(Get-WmiObject Win32_Service -filter \"Name='W32Time'\").StartMode<\/pre>\n<p>Once you determine the startup type of desired service, you can change it using Set-Service cmdlet:<\/p>\n<pre lang=\"PowerShell\">Set-Service W32Time -StartupType Manual<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you want to find out startup type of a service using Get-Service cmdlet, you are out of luck. Get-Service cmdlet does not have StartupType property. Set-Service however does. So [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19],"tags":[212],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Get-Service StartupType - Bhargav&#039;s IT Playground<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get-Service StartupType - Bhargav&#039;s IT Playground\" \/>\n<meta property=\"og:description\" content=\"If you want to find out startup type of a service using Get-Service cmdlet, you are out of luck. Get-Service cmdlet does not have StartupType property. Set-Service however does. So [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/\" \/>\n<meta property=\"og:site_name\" content=\"Bhargav&#039;s IT Playground\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-17T15:36:00+00:00\" \/>\n<meta name=\"author\" content=\"Bhargav\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bhargav\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/\"},\"author\":{\"name\":\"Bhargav\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"headline\":\"Get-Service StartupType\",\"datePublished\":\"2009-06-17T15:36:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/\"},\"wordCount\":65,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"keywords\":[\"PowerShell\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/\",\"name\":\"Get-Service StartupType - Bhargav&#039;s IT Playground\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\"},\"datePublished\":\"2009-06-17T15:36:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/17\\\/powershell-get-service-startuptype\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bhargavs.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get-Service StartupType\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/\",\"name\":\"Bhargav's IT Playground\",\"description\":\"Passion for Technology. Power of Collaboration.\",\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bhargavs.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\",\"name\":\"Bhargav\",\"logo\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/bhargavs.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get-Service StartupType - Bhargav&#039;s IT Playground","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/","og_locale":"en_US","og_type":"article","og_title":"Get-Service StartupType - Bhargav&#039;s IT Playground","og_description":"If you want to find out startup type of a service using Get-Service cmdlet, you are out of luck. Get-Service cmdlet does not have StartupType property. Set-Service however does. So [&hellip;]","og_url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/","og_site_name":"Bhargav&#039;s IT Playground","article_published_time":"2009-06-17T15:36:00+00:00","author":"Bhargav","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bhargav"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/#article","isPartOf":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/"},"author":{"name":"Bhargav","@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"headline":"Get-Service StartupType","datePublished":"2009-06-17T15:36:00+00:00","mainEntityOfPage":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/"},"wordCount":65,"commentCount":6,"publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"keywords":["PowerShell"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/","url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/","name":"Get-Service StartupType - Bhargav&#039;s IT Playground","isPartOf":{"@id":"https:\/\/bhargavs.com\/#website"},"datePublished":"2009-06-17T15:36:00+00:00","breadcrumb":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/17\/powershell-get-service-startuptype\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bhargavs.com\/"},{"@type":"ListItem","position":2,"name":"Get-Service StartupType"}]},{"@type":"WebSite","@id":"https:\/\/bhargavs.com\/#website","url":"https:\/\/bhargavs.com\/","name":"Bhargav's IT Playground","description":"Passion for Technology. Power of Collaboration.","publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bhargavs.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26","name":"Bhargav","logo":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/bhargavs.com"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1695,"url":"https:\/\/bhargavs.com\/index.php\/2013\/05\/13\/how-to-setup-office-web-apps-server-2013-farm\/","url_meta":{"origin":131,"position":0},"title":"How to setup Office Web Apps Server 2013 farm","author":"Bhargav","date":"May 13, 2013","format":false,"excerpt":"If you are deploying Lync Server 2013 and want to present Powerpoint presentations in Web Conferencing, Office Web Apps Server is a requirement. Most references I found talks about deploying a single server, however, I wanted to deploy redundant setup. In today\u2019s post, I\u2019m going to show you how to\u2026","rel":"","context":"In &quot;Load Balancing&quot;","block_context":{"text":"Load Balancing","link":"https:\/\/bhargavs.com\/index.php\/category\/technology\/load-balancing\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2013\/05\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1664,"url":"https:\/\/bhargavs.com\/index.php\/2011\/04\/27\/how-revert-changes-made-by-enable-psremoting\/","url_meta":{"origin":131,"position":1},"title":"How to revert changes made by Enable-PSRemoting?","author":"Bhargav","date":"April 27, 2011","format":false,"excerpt":"Have you ever been in a situation where you have PowerShell Remoting enabled and you need to put the configuration back the way it was before Enable-PSRemoting was run? While it might seem that just running Disable-PSRemoting should suffice, it turns out to be a bit more work than you\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/powershell\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2013\/03\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":97,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/check-exchange-2003-vitals-powershell-2\/","url_meta":{"origin":131,"position":2},"title":"Check Exchange 2003 vitals with PowerShell","author":"Bhargav","date":"June 12, 2009","format":false,"excerpt":"I have written recently about Free System PTEs and \/PAE usage in Exchange 2003 mailbox servers. I set out to write a PowerShell script that will run against given list of servers and report back certain vitals including boot.ini settings, SystemPages registry setting and current performance data for Free Sytem\u2026","rel":"","context":"In &quot;Exchange 2003&quot;","block_context":{"text":"Exchange 2003","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2003\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1687,"url":"https:\/\/bhargavs.com\/index.php\/2013\/01\/28\/vamt-unable-to-connect-to-wmi-service-on-remote-machine\/","url_meta":{"origin":131,"position":3},"title":"VAMT unable to connect to wmi service on remote machine","author":"Bhargav","date":"January 28, 2013","format":false,"excerpt":"If you are Microsoft\u2019s volume license customer or an MSDN subscriber, the question of tracking usage of your volume license activation may have surfaced. You may already know what Volume Activation Management Tool (VAMT) is. If you aren\u2019t, you can read more about it here. \u00a0 Since I often build\u2026","rel":"","context":"In &quot;Firewall&quot;","block_context":{"text":"Firewall","link":"https:\/\/bhargavs.com\/index.php\/category\/technology\/firewall\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2013\/01\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1670,"url":"https:\/\/bhargavs.com\/index.php\/2011\/08\/22\/microsoft-exchange-2010-powershell-cookbook-review\/","url_meta":{"origin":131,"position":4},"title":"Microsoft Exchange 2010 PowerShell Cookbook Review","author":"Bhargav","date":"August 22, 2011","format":false,"excerpt":"Disclaimer: I am not paid to write about this book and the review written here is my own view. I was recently contacted by Packt Publishing about their recently published book \u201cMicrosoft Exchange 2010 PowerShell Cookbook\u201d. I have voluntarily reviewed books in the past (i.e. Windows Server 2003 Security: A\u2026","rel":"","context":"In &quot;Exchange 2010&quot;","block_context":{"text":"Exchange 2010","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2010\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1628,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","url_meta":{"origin":131,"position":5},"title":"Corrupt or Missing Performance Counters","author":"Bhargav","date":"June 12, 2009","format":false,"excerpt":"One of the functions in the code I posted in \u201cCheck Exchange 2003 vitals with PowerShell\u201d is to check performance counters. When running the script, you may encounter an error: Get-WmiObject : Invalid Class \u00a0 This could happen for 2 reasons: 1: You have a typo in Perf Counter object.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/pkROc-27","_links":{"self":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":0,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}