Forum Discussion
John_Dodo
Dec 21, 2022Brass Contributor
Retrieve executed script information the best way
Hello, I have this piece of code at the begining of most of my script. $ScriptFolderPath = $PSSCRIPTROOT
$ScriptFolderName = (get-item $ScriptFolderPath ).Name
$BaseFolder = (get-item $Sc...
Dec 23, 2022
For logging? Start-Transcript -Path c:\temp\log.txt at the start en Stop-Transcript at the end of the script logs all console output, but setting up variables won't be shown in it unless you write-host $ScriptFolderPath for example