Unable to Map Network Drive using %username% variable

Matt Kennedy 1 Reputation point
2020-06-03T23:44:41.77+00:00

We are running a windows server 2012 r2 AD environment and would like to dynamically map user specific network drives at time of logon to domain desktop sessions. We created a network share on a 2012 R2 server with full share and security permissions for the everyone group just to see if it would work however whenever we use the following command on domain authenticated user session

net use H: \servername\home\%username% OR net use H: \servername\home\%LogonUser%

we receive the following error:

System error 55 has occurred. The specific network resource or device is no longer available.

In troubleshooting we tried ECHO %username% at a command prompt and receive the correct username. We were able to use the same UNC path above in the builtin "Connect" feature under the Profile tab in AD to get the drive to map correctly. The share is not hidden.

Any help would be greatly appreciated.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,188 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,652 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,666 Reputation points
    2020-06-04T06:30:45.49+00:00

    Hi,

    Q&A currently supports the products listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    Based on my understanding you are using an on-premise Active Directory, I would suggest to reach out to the experts in the dedicated forum below: https://social.technet.microsoft.com/Forums/en-us/home?forum=winserverfiles

    (Please don't forget to accept helpful replies as answer)

    Best regards,
    Leon

    0 comments No comments