I have a larger script. But I would like to work with variables in some things, e.g.:
$date = get-date -Format "yyyy_MM_dd-hhmmss"
$Log = "ErrLog_$($date).txt"
$Error.Clear()
$AktDate = get-date -Format "dd.MM.yyyy hh:mm:ss"
"Start: $($AktDate)" | Out-File $Log
$setPW = 0
$debug = 0
if($debug -eq 1){
$PWDatei = "psK_cm.txt"
} else {
$PWDatei = "psK.txt"
}