You have specified no macros in strings but have a macro in a string (see the macro wrapped in quotes in second line pasted from your code):

$nul = SetOption("NoMacrosInStrings", "On")
$network="@lserver\netlogon\sms\client.bat"

Instead do this:

$network=@lserver+"\netlogon\sms\client.bat"

...and also later:

$runaspath=@lserver+"\netlogon\runnas.exe"
_________________________
mole

Who is John Galt?