Clean Up Log File

We are using SCCM to deploy our scripts here and we are currently using VB. I’m starting to use this toolkit as a means of transferring over to PowerShell. So far its going great! However, the log files seem a bit “information overload” It’s outputting the PS version, OS version, etc. which is not needed as I can grab that info. directly from SCCM itself.

My question is how can I control what is being logged in the log file? If I can get this cleaned up, I’m sure we can fully implement this quickly!

Hi

PSDT uses function called “Write-Log” which allows us to write log messages the way we want. However, data which is written in the log file is defined in AppDeployToolkitMain.ps1 file where you can find “Script Body” region. If you dont want to output unnecessary information then edit this file and remove the unwanted write-log messages and save the file.

note : Its always recommended to keep the PS version,OS version or user specific information in the log file for troubleshooting purpose.

Excellent, this is exactly what I needed, thank you!

Glad it helped you. :slight_smile: