{"id":518,"date":"2011-05-26T15:36:57","date_gmt":"2011-05-26T20:36:57","guid":{"rendered":"https:\/\/www.ryanjadams.com\/?p=518"},"modified":"2011-05-26T15:36:57","modified_gmt":"2011-05-26T20:36:57","slug":"passnoexpire","status":"publish","type":"post","link":"https:\/\/www.ryanjadams.com\/2011\/05\/passnoexpire\/","title":{"rendered":"AD Password Never Expires Utility"},"content":{"rendered":"<p>A few years ago I had a need to find all accounts in Active Directory that had the &#8220;Password Never Expires&#8221; option set.\u00a0 I wrote an HTA with VBScript to make it easy to find these accounts for anyone with little AD experience.\u00a0 I posted the script in the Microsoft Scripting Guys&#8217; community script repository <a title=\"Password Never Expires Utility\" href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/67244a3c-3615-46d5-9c6f-92df8823b7bf\" target=\"_blank\">HERE<\/a>, but I have received several reports recently from community members about errors.\u00a0 I have had the same reports with my <a title=\"AD LastLogon Utility\" href=\"https:\/\/www.ryanjadams.com\/2010\/03\/lastlogon\/\">Active Directory Last Logon Utility<\/a> posted on their site, and it turns out that something gets lost in translation when copying\u00a0code to the site.\u00a0 For whatever reason some of the formatting gets changed, so years later I have decided to post it here by request.<\/p>\n<p>The script is written to search two\u00a0AD LDAP paths, so make sure to change the paths at the top of the script.\u00a0 The script will return any user account objects that have &#8220;Password Never Expires&#8221; set on their account within those defined paths.\u00a0 It also searches all OUs under those paths.\u00a0 Once the accounts are returned you have a few\u00a0choices.\u00a0\u00a0You can remove the option from those accounts, you can delete the accounts if no longer required, or you can simply export them to an Excel spreadsheet.\u00a0 After you have performed actions on those accounts, the script will display the accounts it made changes to and allow you to export those to a spreadsheet as well.<\/p>\n<p>If you have any questions about this utility feel free to leave a comment.\u00a0 Also if you find this utility helpful, let me know in the comments.\u00a0 I always love hearing that I was able to help someone else.<\/p>\n<p>&nbsp;<\/p>\n<h2><a href=\"https:\/\/www.ryanjadams.com\/wp-content\/uploads\/2011\/05\/PasswordNoExpire1.zip\">Password Never Expires Utility<\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>A few years ago I had a need to find all accounts in Active Directory that had the &#8220;Password Never Expires&#8221; option set.\u00a0 I wrote [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_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","enabled":false},"version":2}},"categories":[2,27],"tags":[165,183],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-vbscript","tag-active-directory","tag-vbscript"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Password Never Expires<\/title>\n<meta name=\"description\" content=\"Simply utility to discover, report, and remediate active directory accounts set for password never expires\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Password Never Expires\" \/>\n<meta property=\"og:description\" content=\"Simply utility to discover, report, and remediate active directory accounts set for password never expires\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\" \/>\n<meta property=\"og:site_name\" content=\"Ryan Adams Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/profile.php?id=1190612067\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/profile.php?id=1190612067\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-26T20:36:57+00:00\" \/>\n<meta name=\"author\" content=\"Ryan Adams\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ryanjadams\" \/>\n<meta name=\"twitter:site\" content=\"@ryanjadams\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ryan Adams\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\"},\"author\":{\"name\":\"Ryan Adams\",\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8\"},\"headline\":\"AD Password Never Expires Utility\",\"datePublished\":\"2011-05-26T20:36:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\"},\"wordCount\":289,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8\"},\"keywords\":[\"Active Directory\",\"VBScript\"],\"articleSection\":[\"Active Directory\",\"VBScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\",\"url\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\",\"name\":\"Password Never Expires\",\"isPartOf\":{\"@id\":\"https:\/\/www.ryanjadams.com\/#website\"},\"datePublished\":\"2011-05-26T20:36:57+00:00\",\"description\":\"Simply utility to discover, report, and remediate active directory accounts set for password never expires\",\"breadcrumb\":{\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ryanjadams.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AD Password Never Expires Utility\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ryanjadams.com\/#website\",\"url\":\"https:\/\/www.ryanjadams.com\/\",\"name\":\"Ryan Adams Blog\",\"description\":\"Microsoft Data Platform\",\"publisher\":{\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ryanjadams.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8\",\"name\":\"Ryan Adams\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.ryanjadams.com\/wp-content\/uploads\/2019\/07\/RyanAdams1.jpg?fit=3422%2C5133&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.ryanjadams.com\/wp-content\/uploads\/2019\/07\/RyanAdams1.jpg?fit=3422%2C5133&ssl=1\",\"width\":3422,\"height\":5133,\"caption\":\"Ryan Adams\"},\"logo\":{\"@id\":\"https:\/\/www.ryanjadams.com\/#\/schema\/person\/image\/\"},\"description\":\"Ryan Adams is a Senior Premier Field Engineer for Microsoft. He works directly with customers to help them realize their business potential and accelerate their digital transformation on premises and in the cloud. Previously, Ryan was a Microsoft Data Platform MVP and spent 19 years working for a fortune 100 company. His passion is the SQL Server Engine, High Availability, and Disaster Recovery. He also served on the Board of Directors for the North Texas SQL Server User Group, was President of the PASS Performance Virtual Chapter, was a PASS Regional Mentor, and served as a Director for the PASS organization.\",\"sameAs\":[\"https:\/\/www.ryanjadams.com\",\"http:\/\/www.facebook.com\/profile.php?id=1190612067\",\"http:\/\/www.linkedin.com\/in\/ryanjadams\",\"https:\/\/x.com\/ryanjadams\",\"https:\/\/www.youtube.com\/channel\/UCWWur1vi5nXN0-zy8Adyslg?view_as=subscriber\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Password Never Expires","description":"Simply utility to discover, report, and remediate active directory accounts set for password never expires","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:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/","og_locale":"en_US","og_type":"article","og_title":"Password Never Expires","og_description":"Simply utility to discover, report, and remediate active directory accounts set for password never expires","og_url":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/","og_site_name":"Ryan Adams Blog","article_publisher":"http:\/\/www.facebook.com\/profile.php?id=1190612067","article_author":"http:\/\/www.facebook.com\/profile.php?id=1190612067","article_published_time":"2011-05-26T20:36:57+00:00","author":"Ryan Adams","twitter_card":"summary_large_image","twitter_creator":"@ryanjadams","twitter_site":"@ryanjadams","twitter_misc":{"Written by":"Ryan Adams","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#article","isPartOf":{"@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/"},"author":{"name":"Ryan Adams","@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8"},"headline":"AD Password Never Expires Utility","datePublished":"2011-05-26T20:36:57+00:00","mainEntityOfPage":{"@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/"},"wordCount":289,"commentCount":0,"publisher":{"@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8"},"keywords":["Active Directory","VBScript"],"articleSection":["Active Directory","VBScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/","url":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/","name":"Password Never Expires","isPartOf":{"@id":"https:\/\/www.ryanjadams.com\/#website"},"datePublished":"2011-05-26T20:36:57+00:00","description":"Simply utility to discover, report, and remediate active directory accounts set for password never expires","breadcrumb":{"@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ryanjadams.com\/2011\/05\/passnoexpire\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ryanjadams.com\/"},{"@type":"ListItem","position":2,"name":"AD Password Never Expires Utility"}]},{"@type":"WebSite","@id":"https:\/\/www.ryanjadams.com\/#website","url":"https:\/\/www.ryanjadams.com\/","name":"Ryan Adams Blog","description":"Microsoft Data Platform","publisher":{"@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ryanjadams.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/374bd7db8c31b8c84c826544c0ef8de8","name":"Ryan Adams","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.ryanjadams.com\/wp-content\/uploads\/2019\/07\/RyanAdams1.jpg?fit=3422%2C5133&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.ryanjadams.com\/wp-content\/uploads\/2019\/07\/RyanAdams1.jpg?fit=3422%2C5133&ssl=1","width":3422,"height":5133,"caption":"Ryan Adams"},"logo":{"@id":"https:\/\/www.ryanjadams.com\/#\/schema\/person\/image\/"},"description":"Ryan Adams is a Senior Premier Field Engineer for Microsoft. He works directly with customers to help them realize their business potential and accelerate their digital transformation on premises and in the cloud. Previously, Ryan was a Microsoft Data Platform MVP and spent 19 years working for a fortune 100 company. His passion is the SQL Server Engine, High Availability, and Disaster Recovery. He also served on the Board of Directors for the North Texas SQL Server User Group, was President of the PASS Performance Virtual Chapter, was a PASS Regional Mentor, and served as a Director for the PASS organization.","sameAs":["https:\/\/www.ryanjadams.com","http:\/\/www.facebook.com\/profile.php?id=1190612067","http:\/\/www.linkedin.com\/in\/ryanjadams","https:\/\/x.com\/ryanjadams","https:\/\/www.youtube.com\/channel\/UCWWur1vi5nXN0-zy8Adyslg?view_as=subscriber"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":0,"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ryanjadams.com\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}