Backgroup job does not work
there 2 variables
1) $cmd (.\findunlinkedgpos.ps1 -query -domain jhu.local)
2) $path (c:\tempps\findunlinkedgpos.txt)
this command works fine.
invoke-expression -command $cmd | out-file $path
this command not work.
start-job -name gpocom01 -argumentlist $cmd, $path -scriptblock {param($c,$p) invoke-expression $c | out-file $p}
first command tells there 1 unlinked gpo.
second command creates output file file empty. can me?
merry xmas everyone!!
Windows Server > Windows PowerShell
Comments
Post a Comment