{"id":2781,"date":"2017-01-09T09:00:30","date_gmt":"2017-01-09T17:00:30","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=2781"},"modified":"2025-12-27T00:29:25","modified_gmt":"2025-12-27T08:29:25","slug":"service-start-time","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/windows-services\/service-start-time\/","title":{"rendered":"When did my Windows Service Start?"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load\" src=\"\/blog\/images\/windows-service-uptime.webp\" title=\"Windows Service Uptime\" alt=\"Windows Service Uptime\" width=\"256\" height=\"256\" border=\"0\"><\/div>\n<p><\/p>\n<p>Here are four ways to determine when your windows service last started.<\/p>\n<hr class=\"blog-section\">\n<div style=\"width:100%;margin-bottom:30px;\">\n<div style=\"margin:0px;float:right;\"><a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.coretechnologies.com\/images\/top.jpg\" border=\"0\" width=\"50\" height=\"18\" title=\"Go to the top\" alt=\"\" \/><\/a><\/div>\n<\/div>\n<h2 class=\"blog-caption\">Solution #1: Search the Windows Event Logs with PowerShell<\/h2>\n<p>The <a href=\"\/blog\/windows-services\/event-viewer-troubleshoot-windows-services\/\">Windows Event Logs<\/a> hold a wealth of information about your computer&#8217;s activities. Indeed, a new record is added to the System event log whenever a windows service starts or stops.<\/p>\n<p>The easiest way to find your service&#8217;s most recent start time is to use a specially crafted PowerShell command to search the System event log. For example, the following line will return the last time the &#8220;Print Spooler&#8221; service was started:<\/p>\n<blockquote><p><b>(Get-EventLog -LogName &quot;System&quot; -Source &quot;Service Control Manager&quot; -EntryType &quot;Information&quot; -Message &quot;*Print Spooler service*running*&quot; -Newest 1).TimeGenerated<\/b><\/p><\/blockquote>\n<p>Be sure to replace &quot;Print Spooler&quot; with the display name of the service you are investigating!\n<\/p>\n<p>\n<a href=\"\/blog\/images\/powershell-windows-service-start-time.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"PowerShell - Windows Service Start Time\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/powershell-windows-service-start-time.png\" border=\"0\" title=\"PowerShell - Windows Service Start Time (click to enlarge)\" alt=\"PowerShell - Windows Service Start Time\" width=\"560\" \/><\/a>\n<\/p>\n<hr class=\"blog-section\">\n<div style=\"width:100%;margin-bottom:30px;\">\n<div style=\"margin:0px;float:right;\"><a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.coretechnologies.com\/images\/top.jpg\" border=\"0\" width=\"50\" height=\"18\" title=\"Go to the top\" alt=\"\" \/><\/a><\/div>\n<\/div>\n<h2 class=\"blog-caption\">Solution #2: Search the Windows Event Logs using the Event Viewer<\/h2>\n<p>Instead of running a PowerShell command, you can also search the Event Log manually.<\/p>\n<p>To find the event log record showing when your service was last started:<\/p>\n<ol>\n<li>\n<p>Open the <b>Event Viewer<\/b> from the Control Panel (search for it by name).<\/p>\n<\/li>\n<li>\n<p>In the left-hand column, navigate to <b>Windows Logs > System<\/b>:<\/p>\n<p>\n<a href=\"\/blog\/images\/event-viewer-windows-system-log.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Event Viewer - Open System Log\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/event-viewer-windows-system-log.png\" border=\"0\" title=\"Event Viewer - Open System Log (click to enlarge)\" alt=\"Event Viewer - Open System Log\" width=\"520\" \/><\/a>\n<\/p>\n<\/li>\n<li>\n<p>Click <b>Find&#8230;<\/b> on the right to bring up the Find window. Enter the name of the service and click the <b>Find Next<\/b> button to highlight the first matching record in the middle panel. We have entered Spooler, for the Windows Spooler service:<\/p>\n<p>\n<a href=\"\/blog\/images\/event-viewer-find-spooler.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Event Viewer - Find\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/event-viewer-find-spooler.png\" border=\"0\" title=\"Event Viewer - Find (click to enlarge)\" alt=\"Event Viewer - Find\" width=\"520\" \/><\/a>\n<\/p>\n<\/li>\n<li>\n<p>If necessary, keep clicking the <b>Find Next<\/b> button until a record saying that your service has &#8220;entered the running state&#8221; comes up. The Source should be <b>Service Control Manager<\/b>, and the time your service started will be displayed in the <b>Logged<\/b> value. The screenshot show that the Print Spooler service last started at 8:04:55 AM on January 7th 2017:<\/p>\n<p>\n<a href=\"\/blog\/images\/event-viewer-service-start-time-found.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Print Spooler service start time\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/event-viewer-service-start-time-found.png\" border=\"0\" title=\"Print Spooler service start time (click to enlarge)\" alt=\"Print Spooler service start time\" width=\"520\" \/><\/a>\n<\/p>\n<\/li>\n<\/ol>\n<hr class=\"blog-section\">\n<div style=\"width:100%;margin-bottom:30px;\">\n<div style=\"margin:0px;float:right;\"><a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.coretechnologies.com\/images\/top.jpg\" border=\"0\" width=\"50\" height=\"18\" title=\"Go to the top\" alt=\"\" \/><\/a><\/div>\n<\/div>\n<h2 class=\"blog-caption\">Solution #3: Figure out when the Service&#8217;s Process was Started<\/h2>\n<p>Each running windows service is backed by an underlying process. 99.9% of the time, that process was launched immediately when the service started. So finding the process start time will give us the service start time.<\/p>\n<p>To find out when the service&#8217;s process was started:<\/p>\n<ol>\n<li>\n<p>Determine the process identifier (PID) of the service&#8217;s process using the SC command. For a service named MyService, run:<\/p>\n<blockquote><p><b>sc queryex MyService<\/b><\/p><\/blockquote>\n<p>(Be sure to enclose the service name in quotes if it contains spaces.)<\/p>\n<p>\nHere is the result for the <b>Spooler<\/b> service:\n<\/p>\n<p>\n<a href=\"\/blog\/images\/sc-spooler-service-pid.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Use SC to find the Service PID\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/sc-spooler-service-pid.png\" border=\"0\" title=\"Use SC to find the Service PID (click to enlarge)\" alt=\"Use SC to find the Service PID\" width=\"520\" \/><\/a>\n<\/p>\n<p>Make a note of the number on the PID line (1276 in the screenshot above).<\/p>\n<\/li>\n<li>\n<p>Next, <a href=\"https:\/\/technet.microsoft.com\/library\/hh831491.aspx#BKMK_powershell\" target=\"_blank\" rel=\"noopener noreferrer\">open a PowerShell window<\/a> and run:<\/p>\n<blockquote><p><b>Get-Process | select name, id, starttime | select-string &lt;PID&gt;<\/b><\/p><\/blockquote>\n<p>where &lt;PID&gt; is the process identifier from step 1. The start time will come back in the result. Here is what we got for the spooler&#8217;s process (#1276):<\/p>\n<p>\n<a href=\"\/blog\/images\/powershell-process-start-time.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Run PowerShell Get-Process\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/powershell-process-start-time.png\" border=\"0\" title=\"Run PowerShell Get-Process (click to enlarge)\" alt=\"Run PowerShell Get-Process\" width=\"520\" \/><\/a>\n<\/p>\n<\/li>\n<\/ol>\n<hr class=\"blog-section\">\n<div style=\"width:100%;margin-bottom:30px;\">\n<div style=\"margin:0px;float:right;\"><a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.coretechnologies.com\/images\/top.jpg\" border=\"0\" width=\"50\" height=\"18\" title=\"Go to the top\" alt=\"\" \/><\/a><\/div>\n<\/div>\n<h2 class=\"blog-caption\">Solution #4: Use the System Boot\/Up Time (for Automatic Windows Services)<\/h2>\n<p>Most Windows Services start when your computer boots and run continuously, 24&#215;7 in the background. For those services, the system boot time is a reasonable approximate.<\/p>\n<p>You can run the built-in <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/bb491007.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">systeminfo<\/a> command to discover when the system last started. Amongst the valuable information systeminfo returns, look for the &#8220;System Boot Time&#8221; line:<\/p>\n<p><a href=\"\/blog\/images\/systeminfo-boot-time.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"System Boot Time\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/systeminfo-boot-time.png\" border=\"0\" title=\"System Boot Time (click to enlarge)\" alt=\"System Boot Time\" width=\"560\" \/><\/a><\/p>\n<p>However, if you&#8217;re ever in a situation where you can&#8217;t remember the command to use, know that the Task Manager&#8217;s Performance tab shows how long the computer has been up (&#8220;Up time&#8221;). The system boot time is a simple calculation away.<\/p>\n<p><a href=\"\/blog\/images\/task-manager-uptime.png\" class=\"zoomPopup\" rel=\"zoomgroup noopener noreferrer\" title=\"Task Manager - Uptime\" target=\"_blank\"><br \/>\n<img decoding=\"async\" src=\"\/blog\/images\/task-manager-uptime.png\" border=\"0\" title=\"Task Manager - Uptime (click to enlarge)\" alt=\"Task Manager - Uptime\" width=\"560\" \/><\/a><\/p>\n<hr class=\"blog-section\">\n<div style=\"width:100%;margin-bottom:30px;\">\n<div style=\"margin:0px;float:right;\"><a href=\"#top\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.coretechnologies.com\/images\/top.jpg\" border=\"0\" width=\"50\" height=\"18\" title=\"Go to the top\" alt=\"\" \/><\/a><\/div>\n<\/div>\n<p>So there are four easy ways to find out when your windows service started. Use whichever one best fits your situation. Good luck with your troubleshooting\/investigation!<\/p>\n<div style=\"margin-top:30px\" align=\"center\">\n<div class=\"cta-button-1\">\n<table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"\/blog\/tag\/windows-services-2\/\" title=\"More articles about Windows Services\"><span><nobr>More articles about Windows Services&#8230;<\/nobr><\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/net-vs-sc\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: Should I use NET or SC to start\/stop\/restart our Windows Services?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/net-vs-sc-command-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: Should I use NET or SC to start\/stop\/restart our Windows Services?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/how-to-restart-service-daily\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"How to Restart a Windows Service Every Day (or Week)\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/restart-windows-service-150x150-2.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">How to Restart a Windows Service Every Day (or Week)<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/windefend\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Essential Windows Services: Microsoft Defender Antivirus Service \/ WinDefend\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/microsoft-defender-150x150-1.webp\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Essential Windows Services: Microsoft Defender Antivirus Service \/ WinDefend<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>Here are four ways to determine when your windows service last started. Solution #1: Search the Windows Event Logs with PowerShell The Windows Event Logs hold a wealth of information about your computer&#8217;s activities. Indeed, a new record is added &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/service-start-time\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2783,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[79,119,163,172,196],"class_list":["post-2781","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows-services","tag-event-viewer","tag-powershell","tag-task-manager","tag-uptime","tag-windows-services-2"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/2781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=2781"}],"version-history":[{"count":4,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/2781\/revisions"}],"predecessor-version":[{"id":13291,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/2781\/revisions\/13291"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/2783"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=2781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=2781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=2781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}