Why does my command behaves differently when I run it from the Windows Explorer and from ISE?
I have a simple command from Test1.ps1 (both Test1 and Test2 are in the same folder)
& ".\Test2.ps1"
When I run it from Windows explorer, the script Test2.ps1 is executed. However, when I run it in ISE it doesnt work and I get the following error:
& : Die Benennung ".\Test2.ps1" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang. In Zeile:1 Zeichen:3 +& ".\Test2.ps1"
- CategoryInfo : ObjectNotFound: (.\Test2.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Sorry for the german: it basically says: ".\Test2.ps1" was not found as a name of a cmdlet, a function, a script file or an executed programm. check the typing of the name or if the path is correct