Try adding the comspec var :

Code:
 SHELL '%comspec% /c RD /S /Q "\\server\apps1$\test"'