{"id":275,"date":"2018-10-22T18:41:44","date_gmt":"2018-10-22T18:41:44","guid":{"rendered":"http:\/\/certcent.io\/?p=275"},"modified":"2018-10-22T18:41:44","modified_gmt":"2018-10-22T18:41:44","slug":"automating-windows-domain-login-through-powershell","status":"publish","type":"post","link":"https:\/\/certcent.io\/index.php\/2018\/10\/22\/automating-windows-domain-login-through-powershell\/","title":{"rendered":"Automating Windows domain login through Powershell."},"content":{"rendered":"<p>If you are a Windows administrator, you know the registry is key to automation and troubleshooting client machines.  Of course automating logins is very useful with lots of machines that do the same thing.  We have a group of machines at one plant&#8217;s sole purpose is data collection.  The shop users are not interested in remembering password, so automating the login is a must.<br \/>\nHere is a list of the keys required that can be entered through Powershell remotely through a PSSession, which I enabled through a Windows login startup script using enable-psremoting -force.<br \/>\nHere are the (4) keys required to auto login a domain user, you need to create 3 new entries and modify just 1:<\/p>\n<pre class=\"lang:default decode:true \">remove-itemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultDomain\nremove-itemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultUserName\nremove-itemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultPassword\nremove-itemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name AutoAdminLogon\nnew-ItemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultDomainName -type string -Value domainname\nnew-ItemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultUsername -type string -Value username\nnew-ItemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name DefaultPassword -type string -Value password\nnew-ItemProperty 'HKLM:\\software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon' -Name AutoAdminLogon -type string -Value 1<\/pre>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a Windows administrator, you know the registry is key to automation and troubleshooting client machines. Of course automating logins is very useful with lots of machines that do the same thing. We have a group of machines at one plant&#8217;s sole purpose is data collection. The shop users are not interested in&hellip; <a class=\"more-link\" href=\"https:\/\/certcent.io\/index.php\/2018\/10\/22\/automating-windows-domain-login-through-powershell\/\">Continue reading <span class=\"screen-reader-text\">Automating Windows domain login through Powershell.<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts\/275"}],"collection":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":0,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"wp:attachment":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}