The @lserver macro returns the servername with a \\ prefix so you if statement requires:

If @lserver = "\\srv2"

Not

If @lserver = "srv2"

Rory