Try adding this before mapping...
 Code:
$nul = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System","EnableLinkedConnections",1,"REG_DWORD")


http://support.microsoft.com/kb/937624