Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create shortcuts on a WindowsXP box to about 100 solaris directories which are mounted as SMB shares. If I go through the process manually, I create a shortcut, entering the UNC path as the target. When I click on the shortcut, Windows asks me for a username/password. Once I enter that and click "Remember", then the shortcut is accessible without problems.

How can I automate this process in a script so I can do this to multiple PCs. I know how to write a powershell script to create the shortcut, but not sure how to do the password entering, remembering part.

share|improve this question
windows shouldn't be asking for credentials to a share that the user has access to with his current credentials. If you use groups to assign permissions and put the users in the groups you shouldn't need to save passwords – Jim B May 14 '11 at 2:53
C:\Users\BMDan>net use /?
The syntax of this command is:

[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

share|improve this answer
+!, net use \\computername\sharename password /user:username /savecred – Chris S Jul 21 '10 at 17:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.