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

Popular posts from this blog

Azure MFA with Azure AD and RDS

Failed to setup initiator portal. Error status is given in the dump data.

Invalid pointer on gpresult /h gpreport.html