Skip to main content

PowerShell Variablen


Variable Typ Beschreibung
$PSScriptRoot System.String Der Pfad zum Ordner worin sich das aktuelle Skript befindet
$PSCommandPath System.String Vollständiger Pfad zum aktuellen Skript
     
     
$MyInvocation InvocationInfo Enthält Infos darüber, wie das Skript aufgerufen wurde
$MyInvocation.MyCommand CommandInfo Informationen und die Idendität des aktuellen Kommando-Objekts
$MyInvocation.MyCommand.CommandType

$MyInvocation.MyCommand.Path
Enthält den Pfad zum aktuellen Skript