Assuming that you already know how to get the workstation name into an array....

Code:
For each $wkstn in $arry
Run "Beyondexecv2 \\" + $wrkid + " -d LockWorkstation -l 0"
Next

_________________________
Today is the tomorrow you worried about yesterday.