Run PS file using puppet exec command

in registerDLL.ps1 file

#registerDLL.ps1
$location=Set-Location -Path C:\Windows\SysWOW64
regsvr32.exe "C:\ProgramFiles(x86)_shiva\HashMgr\HashMgr.dll"

exec { 'RegisterDll':
  command   => file('C:\Temp\puppetcode\registerDLL.ps1'),
  provider  => powershell,
  logoutput => true,
}

Enable IIS AnonymousAuthentication using exec and puppet

exec{‘set-anon-auth’:
command => ‘Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name Enabled -Value True -location mysite’,
provider => ‘powershell’,
logoutput => true
}