Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Zwei Scripte ein Variable

$
0
0

Hallo,

ich komme einfach nicht auf die Lösung bei meinem Problem, Bitte um Hilfe

Datei Script1.ps1

. "C:\Script2.ps1"

$global:myVar = "Hallo"

script2set "Test"


[System.Windows.Forms.MessageBox]::Show($global:myVar) 

Datei Script2.ps1

function script2set ([string] sVar){

  $gloabl:myVar = sVar

}

das Ergebnis sollte nun eine Messagebox sein mit "Test"

danke für eure Hilfe

Mario



Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>