Navigate / search

PowerShell – General Logging Script

Working in enterprise environments always requires a confidential log for scripting actions implemented in productive stages and even for testing it could be a great advantage. PowerShell offers a great possibility to log every action executed by a script. The CMDlets  Start-Transcript  & Stop-Transcript will help you to achieve a successful logging script.

This will be just an example how you can easyly create a logging script. There are thousands of different ways to solve this. The Microsoft documentation can be found in the following link

The following script will write a general log file to  C:\temp\logging.log containing all relevant basis information about the script execution.

Result Read more