Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

C:\Users\BMDan>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}]
share|improve this answer
1  
+!, net use \\computername\sharename password /user:username /savecred –  Chris S Jul 21 '10 at 17:52

Your Answer

 
discard

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