PS profile variables & transcript

$Global:scripts = "C:\Users\me\Documents\scripts"
$Global:reports = "C:\Users\me\Documents\Reports"

[string]$date = get-date -format "_dd-MMM-yy_HH-mm-ss"


$basepath = $env:userprofile + "\documents\pstranscripts\"


if((test-path $basepath) -eq $false){New-item –ItemType directory –force $basepath}


$Global:filepath = $basepath + "pstranscript" + $date + ".txt"


start-transcript -Path $filepath