Microsoft Virtualization Discussions

Logging Infrastructure within PowerShell Toolkit

TEAMHELPID
2,495 Views

Please guide me if there is any logging infrastructure within PowerShell Toolkit to capture events/info/warnings/errors or cmdlet parameters. If yes, how to enable & configure it.

I mean log for all the activities that happen in PowerShell Toolkit, such a what cmdlets the user has run, what warnings occured, etc. (like a normal logging infrastructure for any good application).

1 ACCEPTED SOLUTION

sizemore
2,495 Views

The toolkit is just that a toolkit.  It is not an application, it's a low level building block that enables you to build your own custom solutions. Each individual cmdlet has standard warning/error/debug/info information, but that information is written to the PowerShell host, not a common log.   If your solutions require a logging infrastructure, you can build one into your scripts using standard cmdlets like New-Event, and out-file.

Hope that helps,

~Glenn

View solution in original post

1 REPLY 1

sizemore
2,496 Views

The toolkit is just that a toolkit.  It is not an application, it's a low level building block that enables you to build your own custom solutions. Each individual cmdlet has standard warning/error/debug/info information, but that information is written to the PowerShell host, not a common log.   If your solutions require a logging infrastructure, you can build one into your scripts using standard cmdlets like New-Event, and out-file.

Hope that helps,

~Glenn

Public