How Can Puppet Install IIS With Full Duration Logging of the Installation Itself?
I want to use Puppet to install IIS with full-duration logging. Through a simple PowerShell command, I install IIS but with poor Puppet logging. I need to get around this and have Puppet log everything to the very end of the installation. For background, a Puppet manifest can execute this raw PowerShell command and successfully install IIS: Import-module servermanager; Add-windowsfeature web-server, web-webserver
The Puppet technology can log and on the client (Puppet agent node) and server (Puppet Master server). But with the command above, Puppet logging does not stay with it. Normally to get around long-duration PowerShell processes, I use the "start-process" command with the "wait" option. This way the PowerShell operation does not return control until the targeted process is complete. Despite working well, I have found that this does not work for installing IIS. The error I get is consistent with not having sufficient permissions. Installing other things or doing other duties that require administrator privileges are normally not a problem with start-process. I try to get around this limitation of start-process and installing IIS by having a Scheduled Task kick off the installation of IIS. This Scheduled Task is executed by the "System" user. The IIS installation still fails.
What can I do to install IIS and have a Puppet Manifest log the long-duration process? It seems that only a raw command will allow IIS to be installed. I want full-duration logging, and nothing I try works.