You're right, there is a bug in the function, but it wasn't copied as posted. The following line needs to be corrected...

Code:

If Not $sComputer $sComputer="" EndIf


...to...
Code:

If Not $sComputer $sComputer=@WKSTA EndIf