{"id":81176,"date":"2016-12-24T01:00:43","date_gmt":"2016-12-24T09:00:43","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/?p=81176"},"modified":"2019-02-18T09:10:16","modified_gmt":"2019-02-18T16:10:16","slug":"powertip-get-a-list-of-local-users-in-windows-10-windows-server-2016","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-get-a-list-of-local-users-in-windows-10-windows-server-2016\/","title":{"rendered":"PowerTip: Get a list of local Users in Windows 10 \/ Windows Server 2016"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use the cmdlets provided in PowerShell 5.1 to manage local user accounts on a system.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/> I remember having to use the Active Directory Service Interfaces (ADSI) accelerator to access a list of local users in PowerShell. Is there a cmdlet that could do this now?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/> Yes.\u00a0 In the most recent version of Windows 10 \/ Windows Server 2016 with PowerShell 5.1, you can run just one cmdlet to pull up a list of local users.<\/p>\n<p style=\"padding-left: 90px\"><code>Get-LocalUser<\/code><\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\"The Doctor\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use the cmdlets provided in PowerShell 5.1 to manage local user accounts on a system. I remember having to use the Active Directory Service Interfaces (ADSI) accelerator to access a list of local users in PowerShell. Is there a cmdlet that could do this now? Yes.\u00a0 In the most recent version of Windows 10 [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[568,639,641],"tags":[56,356,154,45],"class_list":["post-81176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hey-scripting-guy","category-powertip","category-windows-powershell","tag-guest-blogger","tag-powertip","tag-sean-kearney","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use the cmdlets provided in PowerShell 5.1 to manage local user accounts on a system. I remember having to use the Active Directory Service Interfaces (ADSI) accelerator to access a list of local users in PowerShell. Is there a cmdlet that could do this now? Yes.\u00a0 In the most recent version of Windows 10 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/81176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=81176"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/81176\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=81176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=81176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=81176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}