{"id":1204,"date":"2019-09-14T13:29:43","date_gmt":"2019-09-14T13:29:43","guid":{"rendered":"\/blog\/?p=1204"},"modified":"2019-10-10T01:45:58","modified_gmt":"2019-10-10T01:45:58","slug":"windows-setup-for-win","status":"publish","type":"post","link":"\/blog\/index.php\/windows-setup-for-win\/","title":{"rendered":"windows setup for winrm, for Ansible"},"content":{"rendered":"<p>In order for Ansible to connect to your windows server, you need to open winrm,you can do it by putting the settings inn a ps1 (\/var\/www\/html\/w.ps1) file in your webserver with these contents:<\/p>\n<p>Enable-PSRemoting<br \/>\nSet-Item -Path &#8220;WSMan:\\localhost\\Service\\Auth\\Basic&#8221; -value True<br \/>\nSet-Item -Path &#8220;WSMan:\\localhost\\Service\\AllowUnencrypted&#8221; -value True<br \/>\nnet localgroup &#8220;Remote Management Users&#8221; my_admin \/add<br \/>\nnet localgroup administrators my_admin \/add<\/p>\n<p>Then in the windows server, you can get it and run it using:<br \/>\npowershell &#8220;IEX(New-Object Net.WebClient).downloadString(&#8216;http:\/\/10.4.192.192\/w.ps1&#8217;)&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order for Ansible to connect to your windows server, you need to open winrm,you can do it by putting the settings inn a ps1 (\/var\/www\/html\/w.ps1) file in your webserver with these contents: Enable-PSRemoting Set-Item -Path &#8220;WSMan:\\localhost\\Service\\Auth\\Basic&#8221; -value True Set-Item -Path &#8220;WSMan:\\localhost\\Service\\AllowUnencrypted&#8221; -value True net localgroup &#8220;Remote Management Users&#8221; my_admin \/add net localgroup administrators my_admin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1204","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1204"}],"version-history":[{"count":2,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1204\/revisions"}],"predecessor-version":[{"id":1212,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1204\/revisions\/1212"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1204"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}