OK - gave an alternative a whirl..
 Code:
$MaxSess = 2
$UsrCmd = 'cmd.exe'
$CmdArg = ' arguments...'
$Cmd = 'tasklist /fi "Username eq %USERDOMAIN%\%USERID%" /fi "Imagename eq ' + $UsrCmd + '"'
$aResult = WshPipe($Cmd)
If UBound($aResult) < ($MaxSess + 1) ; 2 header lines, plus max 2 sessions
  Run $UsrCmd + ' ' + $CmdArg
Else
  'Sorry - already running ' $MaxSess ' instances of ' $UsrCmd '!' @CRLF
EndIf
Tried this on our TS system and it works.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D