{"id":12782,"date":"2019-07-23T15:37:30","date_gmt":"2019-07-23T15:37:30","guid":{"rendered":"http:\/\/shivaprogramming.com\/blog\/?p=12782"},"modified":"2019-10-11T19:26:26","modified_gmt":"2019-10-11T19:26:26","slug":"run-ps-file-command-using-puppet-exec-command","status":"publish","type":"post","link":"http:\/\/shivaprogramming.com\/blog\/run-ps-file-command-using-puppet-exec-command\/","title":{"rendered":"Run PS file  using puppet exec command"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">in registerDLL.ps1 file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#registerDLL.ps1\n$location=Set-Location -Path C:\\Windows\\SysWOW64\nregsvr32.exe \"C:\\ProgramFiles(x86)_shiva\\HashMgr\\HashMgr.dll\"\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>exec { 'RegisterDll':\n  command   => file('C:\\Temp\\puppetcode\\registerDLL.ps1'),\n  provider  => powershell,\n  logoutput => true,\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Enable IIS AnonymousAuthentication using exec and puppet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">exec{&#8216;set-anon-auth&#8217;:<br \/>   command => &#8216;Set-WebConfigurationProperty -filter \/system.WebServer\/security\/authentication\/AnonymousAuthentication -name Enabled -Value True -location mysite&#8217;,<br \/>   provider => &#8216;powershell&#8217;,<br \/>   logoutput => true<br \/> }<\/p>\n","protected":false},"excerpt":{"rendered":"<p>in registerDLL.ps1 file Enable IIS AnonymousAuthentication using exec and puppet exec{&#8216;set-anon-auth&#8217;: command => &#8216;Set-WebConfigurationProperty -filter \/system.WebServer\/security\/authentication\/AnonymousAuthentication -name Enabled -Value True -location mysite&#8217;, provider => &#8216;powershell&#8217;, logoutput&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-12782","post","type-post","status-publish","format-standard","hentry","category-puppet-configuration-management-tool"],"_links":{"self":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/12782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/comments?post=12782"}],"version-history":[{"count":4,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/12782\/revisions"}],"predecessor-version":[{"id":13973,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/12782\/revisions\/13973"}],"wp:attachment":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/media?parent=12782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/categories?post=12782"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/tags?post=12782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}