Last active
August 28, 2024 08:03
-
-
Save torgro/1550a6b177935bddc391 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Write-Verbose | |
{ | |
[cmdletbinding()] | |
Param( | |
[string]$Message | |
) | |
# Comment the next line to disable logging to file | |
[string]$LogFilePath = "c:\temp\customlog.txt" | |
if($LogFilePath) | |
{ | |
Add-Content -Path "$LogFilePath" -Value "$Message$newLine" | |
} | |
Microsoft.PowerShell.Utility\Write-Verbose -Message $Message | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment