{"id":583,"date":"2015-03-25T11:27:25","date_gmt":"2015-03-25T11:27:25","guid":{"rendered":"http:\/\/giraffeit.com\/?p=583"},"modified":"2018-04-19T10:15:11","modified_gmt":"2018-04-19T10:15:11","slug":"psneverloggedin","status":"publish","type":"post","link":"https:\/\/giraffeit.com\/index.php\/2015\/03\/25\/psneverloggedin\/","title":{"rendered":"Powershell : Find all active users who havent logged in"},"content":{"rendered":"<p>Request from a customer. Find me all active ( IE not disabled ) users in a particular OU who have never logged in.<\/p>\n<p>&#8220;I have a powershell for that&#8221; appears to be the default answer for most queries these days &#8230;<\/p>\n<pre class=\"lang:ps decode:true \" >Get-ADUser -Filter {enabled -eq $true} -SearchBase \"OU=Eu,DC=eu,DC=notyou,DC=com\" -Properties \"LastLogonDate\" | sort-object -property lastlogondate -descending |Format-Table -property Name, sAMAccountName, LastLogonDate -AutoSize &amp;gt;&amp;gt;c:temptestoutput.csv<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Request from a customer. Find me all active ( IE not disabled ) users in a particular OU who have never logged in. &#8220;I have a powershell for that&#8221; appears to be the default answer for most queries these days &#8230; Get-ADUser -Filter {enabled -eq $true} -SearchBase &#8220;OU=Eu,DC=eu,DC=notyou,DC=com&#8221; -Properties &#8220;LastLogonDate&#8221; | sort-object -property lastlogondate -descending &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/giraffeit.com\/index.php\/2015\/03\/25\/psneverloggedin\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Powershell : Find all active users who havent logged in&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":208,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bog"],"_links":{"self":[{"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":2,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/posts\/583\/revisions\/762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/media\/208"}],"wp:attachment":[{"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/giraffeit.com\/index.php\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}