how to pass a script stored in a parameter to a job?
i used following code, doesn't work. how can pass script block parameter start-job?
$script="my script...."
start-job -name test -scriptblock {$script}
$sb={ myscript } start-job -name test -scr $sb
[string](0..9|%{[char][int](32+("39826578840055658268").substring(($_*2),2))})-replace "\s{1}\b"
Windows Server > Windows PowerShell
Comments
Post a Comment