{"id":44295,"date":"2020-03-02T09:00:00","date_gmt":"2020-03-02T16:00:00","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=44295"},"modified":"2024-08-15T15:11:51","modified_gmt":"2024-08-15T19:11:51","slug":"computers-last-logon-report","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report","title":{"rendered":"Computer Last Logon Reporting for Mac, Windows & Linux"},"content":{"rendered":"\n

To help clean up inactive directory objects, strengthen security, and meet compliance requirements, you may need to pull a report of the last logon times for each system in your environment. Computer last logon reports help you discover unused local accounts, which become a security liability when left stagnant. And if your organization\u2019s dev workflow involves constant provisioning and deprovisioning of cloud servers and VMs, these reports help keep your directory current and organized.<\/p>\n\n\n\n

When most people think about pulling last logon reports, they think of writing a quick script in PowerShell to query Active Directory\u00ae<\/sup> (AD). This solution works well in a traditional Windows\u00ae<\/sup>-only environment, but because it\u2019s difficult to reliably bind Mac\u00ae<\/sup> and Linux\u00ae<\/sup> systems to AD, it\u2019s unusual to pull a single last logon report from AD for all the systems in a mixed-OS environment. Below, we\u2019ll address some of the nuances of the AD approach and then explore a solution that remotely manages and reports on all three major operating systems at once.   <\/p>\n\n\n\n

Why Last Logon Reports Matter <\/h2>\n\n\n\n

Computer last logon reports are essential for security and regulatory compliance, and they help keep your environment in order. These reports can provide two similar-but-distinct pieces of information: an individual system user account\u2019s last logon time and the last logon time of any<\/em> user account to a given machine. Let\u2019s look more closely at some of the situations that require these reports. <\/p>\n\n\n\n

Organizing Your Directory <\/h3>\n\n\n\n

Your approach to IT asset management<\/a> probably accounts for replacing aging laptops and deprovisioning those systems at the local level. But what happens to the directory objects that used to represent them? With a report that tells you the last time a system contacted your directory, you can quickly identify and eliminate any dormant computer objects, keeping the directory current and organized. This is especially useful if you need to manage large numbers of cloud VMs and servers as part of a DevOps workflow.<\/p>\n\n\n\n

Additionally, inactive user accounts may exist on active systems. These accounts may be disabled or locked due to password expiration, stalled updates, or other security configurations, or they may have never logged on or been activated in the first place. You need a last logon report to begin removing these accounts from their respective systems and from the directory.  <\/p>\n\n\n\n

Security & Compliance    <\/h3>\n\n\n\n

Last logon reporting isn\u2019t just a matter of efficiency \u2014 it helps prove that your organization meets security baselines required for compliance. PCI standards, for example, require that all systems accounts inactive for 90 days be removed. Unused accounts present an unnecessary attack vector for credential thieves<\/a>. These accounts could also be accessed by disgruntled former employees whose credentials may still be valid. <\/p>\n\n\n\n

Some organizations may be tempted to keep old accounts as a way of preserving projects that a former employee was storing, but the best practice is to safely transfer that data and then remove the account. <\/p>\n\n\n\n

\n

Note: <\/strong>Learn about leveraging a cloud directory service to achieve and demonstrate PCI compliance\u2192<\/a>
<\/p>\n<\/div>\n\n\n\n

Troubleshooting<\/h3>\n\n\n\n

Certain user issues sometimes result from a faulty connection or failed sync between their workstation and the central directory. If you\u2019re looking into a problem with a password change or a stalled update, it can be helpful to know the last time the system contacted the directory for authentication. <\/p>\n\n\n\n

Pulling Last Logon Reports With AD <\/h2>\n\n\n\n

Although the fundamentals of pulling a computer last logon report from Active Directory are fairly straightforward, there\u2019s some debate within the AD admin community about the best way to script it in PowerShell. The properties lastLogon<\/strong> and lastLogonTimestamp<\/strong> will return different values, and you may have to manually account for which individual domain controller the system last authenticated to, as well as convert the output to a human-readable date format. There\u2019s also a potential issue with accuracy caused by the default sync frequency: the reported results may have a +\/- 14-day margin of error.<\/p>\n\n\n\n

And even once you sort out those nuances, you\u2019re probably still only getting a last logon report for your Windows machines. This leaves many admins looking for a simpler reporting solution that also accommodates Mac and Linux systems.     <\/p>\n\n\n\n

System Reporting With a Cloud Directory Service <\/h2>\n\n\n\n

In the modern cloud era, IT teams are finding that system reporting is only one of many components of Active Directory that haven\u2019t aged well. Many are surprised to find out that an entirely new, cloud-hosted alternative directory service exists. JumpCloud\u00ae<\/sup> Directory-as-a-Service\u00ae<\/sup> serves as an authoritative central identity provider for virtually all modern IT resources, both on-prem and in the cloud, including SaaS apps, servers, networks, cloud infrastructure, along with Mac, Windows, and Linux systems.<\/p>\n\n\n\n

This cloud directory service requires zero on-prem hardware, and can be remotely managed via a secure web console. It includes a PowerShell module to pull and customize detailed, cross-OS system reports<\/a> (including computer last logon reports), and the System Insights\u2122<\/a> feature offers deeper, near-real-time access to OS-level data, including hardware configurations and usage, network connections, installed applications, and more. If this alternative to last logon reporting with AD sounds appealing, learn more about cross-platform system management with JumpCloud<\/a>.   
<\/p>\n","protected":false},"excerpt":{"rendered":"

Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.<\/p>\n","protected":false},"author":91,"featured_media":44296,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","inline_featured_image":false,"footnotes":""},"categories":[23,2337],"tags":[],"collection":[2778,2775],"platform":[],"funnel_stage":[3016],"coauthors":[],"acf":[],"yoast_head":"\nComputer Last Logon Reporting for Mac, Windows & Linux - JumpCloud<\/title>\n<meta name=\"description\" content=\"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Computer Last Logon Reporting for Mac, Windows & Linux\" \/>\n<meta property=\"og:description\" content=\"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\" \/>\n<meta property=\"og:site_name\" content=\"JumpCloud\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-02T16:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-15T19:11:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"780\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mike Ranellone\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Ranellone\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#article\",\"isPartOf\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\"},\"author\":{\"name\":\"Mike Ranellone\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/person\/24d4cb0cb7a9c71b168baee4234925c1\"},\"headline\":\"Computer Last Logon Reporting for Mac, Windows & Linux\",\"datePublished\":\"2020-03-02T16:00:00+00:00\",\"dateModified\":\"2024-08-15T19:11:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\"},\"wordCount\":888,\"publisher\":{\"@id\":\"https:\/\/jumpcloud.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage\"},\"thumbnailUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg\",\"articleSection\":[\"Best Practices\",\"Remote Work\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\",\"url\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\",\"name\":\"Computer Last Logon Reporting for Mac, Windows & Linux - JumpCloud\",\"isPartOf\":{\"@id\":\"https:\/\/jumpcloud.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage\"},\"thumbnailUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg\",\"datePublished\":\"2020-03-02T16:00:00+00:00\",\"dateModified\":\"2024-08-15T19:11:51+00:00\",\"description\":\"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.\",\"breadcrumb\":{\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage\",\"url\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg\",\"contentUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg\",\"width\":780,\"height\":520,\"caption\":\"open page in a report book\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jumpcloud.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Computer Last Logon Reporting for Mac, Windows & Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jumpcloud.com\/#website\",\"url\":\"https:\/\/jumpcloud.com\/\",\"name\":\"JumpCloud\",\"description\":\"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.\",\"publisher\":{\"@id\":\"https:\/\/jumpcloud.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jumpcloud.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jumpcloud.com\/#organization\",\"name\":\"JumpCloud\",\"url\":\"https:\/\/jumpcloud.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"contentUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"width\":598,\"height\":101,\"caption\":\"JumpCloud\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/person\/24d4cb0cb7a9c71b168baee4234925c1\",\"name\":\"Mike Ranellone\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/person\/image\/c369c2a0c9f206bb9873a0446a15bcf5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3db264ca258363eb5ba4360ddf0bed4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3db264ca258363eb5ba4360ddf0bed4c?s=96&d=mm&r=g\",\"caption\":\"Mike Ranellone\"},\"description\":\"Mike is a writer at JumpCloud who's especially interested in the changing role of tech in society. He cut his teeth in the ad agency world and holds an M.F.A. in creative writing from the University of Colorado-Boulder and a B.A. in English and music from St. Lawrence University in Canton, NY. Outside of JumpCloud, he's an avid skier, cellist, and poet.\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Computer Last Logon Reporting for Mac, Windows & Linux - JumpCloud","description":"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.","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:\/\/jumpcloud.com\/blog\/computers-last-logon-report","og_locale":"en_US","og_type":"article","og_title":"Computer Last Logon Reporting for Mac, Windows & Linux","og_description":"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.","og_url":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report","og_site_name":"JumpCloud","article_published_time":"2020-03-02T16:00:00+00:00","article_modified_time":"2024-08-15T19:11:51+00:00","og_image":[{"width":780,"height":520,"url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg","type":"image\/jpeg"}],"author":"Mike Ranellone","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mike Ranellone","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#article","isPartOf":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report"},"author":{"name":"Mike Ranellone","@id":"https:\/\/jumpcloud.com\/#\/schema\/person\/24d4cb0cb7a9c71b168baee4234925c1"},"headline":"Computer Last Logon Reporting for Mac, Windows & Linux","datePublished":"2020-03-02T16:00:00+00:00","dateModified":"2024-08-15T19:11:51+00:00","mainEntityOfPage":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report"},"wordCount":888,"publisher":{"@id":"https:\/\/jumpcloud.com\/#organization"},"image":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage"},"thumbnailUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg","articleSection":["Best Practices","Remote Work"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report","url":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report","name":"Computer Last Logon Reporting for Mac, Windows & Linux - JumpCloud","isPartOf":{"@id":"https:\/\/jumpcloud.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage"},"image":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage"},"thumbnailUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg","datePublished":"2020-03-02T16:00:00+00:00","dateModified":"2024-08-15T19:11:51+00:00","description":"Computer last logon reports are essential for assessing compliance and IT security baselines. Learn how to pull them from your directory.","breadcrumb":{"@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jumpcloud.com\/blog\/computers-last-logon-report"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#primaryimage","url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg","contentUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2020\/02\/computers-last-logon-report.jpg","width":780,"height":520,"caption":"open page in a report book"},{"@type":"BreadcrumbList","@id":"https:\/\/jumpcloud.com\/blog\/computers-last-logon-report#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jumpcloud.com\/"},{"@type":"ListItem","position":2,"name":"Computer Last Logon Reporting for Mac, Windows & Linux"}]},{"@type":"WebSite","@id":"https:\/\/jumpcloud.com\/#website","url":"https:\/\/jumpcloud.com\/","name":"JumpCloud","description":"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.","publisher":{"@id":"https:\/\/jumpcloud.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jumpcloud.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jumpcloud.com\/#organization","name":"JumpCloud","url":"https:\/\/jumpcloud.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/","url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","contentUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","width":598,"height":101,"caption":"JumpCloud"},"image":{"@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jumpcloud.com\/#\/schema\/person\/24d4cb0cb7a9c71b168baee4234925c1","name":"Mike Ranellone","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/#\/schema\/person\/image\/c369c2a0c9f206bb9873a0446a15bcf5","url":"https:\/\/secure.gravatar.com\/avatar\/3db264ca258363eb5ba4360ddf0bed4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3db264ca258363eb5ba4360ddf0bed4c?s=96&d=mm&r=g","caption":"Mike Ranellone"},"description":"Mike is a writer at JumpCloud who's especially interested in the changing role of tech in society. He cut his teeth in the ad agency world and holds an M.F.A. in creative writing from the University of Colorado-Boulder and a B.A. in English and music from St. Lawrence University in Canton, NY. Outside of JumpCloud, he's an avid skier, cellist, and poet."}]}},"_links":{"self":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/posts\/44295"}],"collection":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/users\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/comments?post=44295"}],"version-history":[{"count":3,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/posts\/44295\/revisions"}],"predecessor-version":[{"id":114184,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/posts\/44295\/revisions\/114184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/media\/44296"}],"wp:attachment":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/media?parent=44295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/categories?post=44295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/tags?post=44295"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/collection?post=44295"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/platform?post=44295"},{"taxonomy":"funnel_stage","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/funnel_stage?post=44295"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/coauthors?post=44295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}