

If the Samba is being used for the share, on the Samba server, use the smbpasswd command to add a users password to the SMB database. You can now connect to the Samba share using the username and password. When mapping the network drive, there may be a prompt to enter a username and password. Here is an example: subst T: C:UsersTeamDriveDocumentsSpacesSpace1. After opening ‘cmd, enter ‘subst’ followed by the drive letter you want the Space to have, followed by the Space’s path.

To have a network drive mapped when Windows is restarted, you can create a batch file, such as map.bat at C:\Users\your_username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup, and the network drive will be mapped on boot. Otherwise you will not be able to see the drive in Windows Explorer. Remove-PSDrive -Name X -PSProvider FileSystem New-PSDrive -Name X -PSProvider FileSystem -Root \\fs.\share -Credential $Cred -Persist $Cred = New-Object ('Your Username',$pass) $pass="Your Password"|ConvertTo-SecureString -AsPlainText -Force Note: the /delete option can be used to disconnect a mapped network drive (example: net use m: /delete).Type net use : and press enter (example: net use m: \\fs.\share).Type net use and press enter to view the available drives that can be mapped.Replace fs. with the domain name or IP address of the share. In the Map Network Drive dialog box, type \\fs.\share and select Finish.

