Can you share the logs from your puppet run showing the error(s) received? Also, you may want to look at the module https://forge.puppet.com/puppet/iis, which may either handle this already, or be a good example of code you can build on if the feature is not present.
Rob Nelson [email protected] On Tue, Aug 9, 2016 at 8:53 AM, David Yeo <[email protected]> wrote: > All, > > I have a requirement for automating the setup of IIS through puppet > enterprise, I have a manifest which is not fully executing a powershell > command utilising 'exec' (see below) > > > > > *exec { 'SetvirtualDirectoryDefaultsuserName': command => > '$(Set-ItemProperty -Path "IIS:\Sites\MainWebSite" -Name > virtualDirectoryDefaults.userName -Value domain\username)', provider => > powershell, }* > > the powershell command works perfectly if run direct from a powershell > console > > Where am I going wrong? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/puppet-users/3923f695-665e-47ff-8029-b591ffb6dbc7%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/3923f695-665e-47ff-8029-b591ffb6dbc7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAC76iT-QV2gsNR_rVEp1U5Ev6ZPks36BcD2B7nX_GiJ96ocHBg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
