suppose i have 2 powershell scripts, test1.ps1 and test2.ps1
Test1.PS1
$a=“Test1”
##################
测试2.PS1
回声$
how to ref. $a in test2.ps1 from test1.ps1?
在脚本1中:
Set-Variable -Name a -Value "test1" -Scope Global