Exec Command

28 views
Skip to first unread message

megha sharma

unread,
Sep 1, 2016, 10:00:13 AM9/1/16
to Puppet Users
Hello,

Where can I find the output logs after running exec command on windows puppet agent.

Thanks,
Megha

Moses Mendoza

unread,
Sep 1, 2016, 9:36:15 PM9/1/16
to puppet...@googlegroups.com
> --
> 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 puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/752a48c3-5c8a-494e-8111-51fb4f9a5500%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Hi Megha,

The output should be recorded as an event in Event Viewer (in Windows
Logs => Application). You'll need to specify `logoutput => true` in
your exec resource to actually log the output though, ie:

For example with:

exec { 'my command' :
command => 'Write-Host "hello world"',
provider => 'powershell',
logoutput => true,
}

--
Moses Mendoza
Puppet Labs

Arpit Tolani

unread,
Sep 2, 2016, 1:20:31 AM9/2/16
to puppet...@googlegroups.com
Hello


On Thu, Sep 1, 2016 at 3:30 PM, megha sharma <megha19...@gmail.com> wrote:
> Hello,
>
> Where can I find the output logs after running exec command on windows
> puppet agent.

Check Event Viewer of Windows.

https://docs.puppet.com/puppet/4.2/reference/services_agent_windows.html#logging

>
> Thanks,
> Megha
>
> --
> 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 puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/752a48c3-5c8a-494e-8111-51fb4f9a5500%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards
Arpit Tolani
Reply all
Reply to author
Forward
0 new messages