Problem:
I have to provide user and password when automatically mapping network drive
Solution:
Clear all drive mappings: From a CMD prompt.
net use * /del /Y
net use /persistent:no
Reboot the workstation.
Map network drive saving credentials with this command
net use Z:\\computer_name\share_name /User:DomainUser DomainPassword /persistent:y /savecred