I'm using a tool called 'psgetsid' which automagically grabs all of my computers SIDs across my domain. I'm getting some errors on some of my machines and I'd like to investigate furuther but a simple redirect (>) doesn't log the error information for some reason. Because of this, I wanted to run the utility through WSHPIPE() to write each line out into a CSV file so I can look at the results at my leisure. The following command line generates SIDs for all computers across my domain:
Code:
c:\>psgetsid \\*



This works fine and shows the result for my computer:
Code:
	$rc = WshPipe("%COMSPEC% /c c:\psgetsid.exe ")
For Each $line in $rc
? $line
'test'
sleep 1
Next



I want to be able to use the original command line with the "\\*" so that it will generate output for all computers across my domain but throwing that string into WSHPIPE() with %COMSPEC% doesn't seem to work; my script just hangs with the "\\*" in it. So I tried this and get the same thing. Something I'm missing about interpolation???

Code:
	$rc = WshPipe("%COMSPEC% /c c:\psgetsid.exe "+CHR(92)+CHR(92)+CHR(42))
For Each $line in $rc
? $line
'test'
sleep 1
Next