Mapping drive can be set in different ways, via group policy, using scripting (PowerShell, Vbscript, Jscript) or it can be set via command line.
Setting script via command line can be done easily using ”net” command, like the example below.
The example below shows the syntax on how to map a drive or folder.
net use ?
The syntax of this command is:
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]
NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]
Example:
Net use \\AD_Server\Working_folder Z:
The command will map “Working_folder” to drive Z on the client PC.
The above command will not need a password if run as a batch file and deploy as a logon script via group policy.
To delete the mapped drive : net use Z: /delete
To run manually and map a drive on a client PC that is not a member of the domain, run the command below:
net use z: \\AD_Server\Shared_Folder /user:Domain_Name\User_Name User_Password
The above commands will work, but upon restart map drive will be lost.
So to make the map drive persistent, or to connect the map drives automatically upon restart, use the command below.
net use z: \\AD_Server\Shared_Folder /persistent:yes
The above command will make the map drive persistent, so upon restart, the mapped drive will connect automatically.
The above command also will make use the Vault Credential Manager to store the password for the user.
A problem will arise if the user changes the password and forget to remove or update the password in the vault manager and start a new map drive command if necessary.
So an updated record of any changes made is just essential and save time troubleshooting for simple mistakes.
Cheers..till next time.
================================
Free Android Apps:
Click on links below to find out more:
Linux Android App cheat sheet:
Multiplication Table for early learners
Catholic Rosary Guide for Android:
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Divine Mercy Chaplet Guide (A Powerful prayer):
Comments
Post a Comment