net use
"PS> net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
Z: \\vmware-host\Shared Folders
VMware Shared Folders
The command completed successfully.
But if the PowerShell session is a administrator session, you get something like a network error. This is because the share is not defined to the administrator session. If a "
net use
" is run and the result compared with the one from the normal user session you can see that the Z-drive is missing.PS> net use
New connections will be remembered.
There are no entries in the list.
The drive is then mapped to the session. A new administrator session will also have the Z-drive mapped.
PS> net use Z: '\\vmware-host\shared folders'
The command completed successfully
It is possible to persist the mapping by the parameter "
Persist
", but you might experience that the persistance is a varying subject. I have not looked deeper into the details on this./persistent:{yes | no}
The short help on "net use" is available with the command:
net use /?
The longer help is available with the command:
net use /help
Setting the Z-drive with the PowerShell cmdlet New-PSDrive does not make the vmware shared folders available to administrator sessions.
No comments:
Post a Comment