Powershell template: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
#> | #> | ||
# START TRANSCRIPT LOGGING | |||
Start-Transcript -Path $PathLogs"log_"$(get-date -f yyyy-MM-dd_HH-mm-ss)".txt" -Append | |||
# STOP TRANSCRIPT LOGGING | |||
Stop-Transcript | |||
</pre> | </pre> | ||
[[Category:PowerShell]] | [[Category:PowerShell]] |
Revision as of 11:28, 5 April 2024
Basic template for use when creating a script:
<# .SYNOPSIS .DESCRIPTION .EXAMPLE .OUTPUTS .NOTES #> # START TRANSCRIPT LOGGING Start-Transcript -Path $PathLogs"log_"$(get-date -f yyyy-MM-dd_HH-mm-ss)".txt" -Append # STOP TRANSCRIPT LOGGING Stop-Transcript