bbimis
asked on
how do you add to the windows credential manager using the command prompt
is there a way to add to the windows credential manager via the command prompt
I'm not referring to cmdkey but the actual windows credential manager apparently they are not the same thing.
When I use cmdkey /generic:TERMSRV/server /user:username /pass:password
it works fine it I run mstsc /v:server
but if I run it from the desktop by clicking on a shortcut it prompts me for the password; however, if I put the credentials in windows credential manager I do not get the prompt
so, is there a a command to add a username and password to windows credential manager ?
I don't want any user interaction I want to run it through a bat script or psexec or something.
Thanks!
I'm not referring to cmdkey but the actual windows credential manager apparently they are not the same thing.
When I use cmdkey /generic:TERMSRV/server /user:username /pass:password
it works fine it I run mstsc /v:server
but if I run it from the desktop by clicking on a shortcut it prompts me for the password; however, if I put the credentials in windows credential manager I do not get the prompt
so, is there a a command to add a username and password to windows credential manager ?
I don't want any user interaction I want to run it through a bat script or psexec or something.
Thanks!
ASKER
that shows a user interface and you add the credentials there. I want to do it all from the command line because I have 100+ computers to touch thanks!
> When I use cmdkey /generic:TERMSRV/server /user:username /pass:password
it works fine it I run mstsc /v:server
> but if I run it from the desktop by clicking on a shortcut it prompts me for the password
Are you saying the shortcut points to the one that works fine, i.e. mstsc /v:server?
it works fine it I run mstsc /v:server
> but if I run it from the desktop by clicking on a shortcut it prompts me for the password
Are you saying the shortcut points to the one that works fine, i.e. mstsc /v:server?
ASKER
correct but i'm wondering how do i make the shortcut via the command line because it will be something like this for 100+ pcs
mstsc /v:server1
mstsc /v:server2
ect
for each different location
otherwise i could just push out a shortcut that was premade with mstsc /v:server
but i also need to add the credentials to the windows credential manager so the shortcut will work.
the command mstsc /v:server will work without a prompt when i run it from the command line but prompts for a password when i run it from the desktop. I hope i'm making sense.
mstsc /v:server1
mstsc /v:server2
ect
for each different location
otherwise i could just push out a shortcut that was premade with mstsc /v:server
but i also need to add the credentials to the windows credential manager so the shortcut will work.
the command mstsc /v:server will work without a prompt when i run it from the command line but prompts for a password when i run it from the desktop. I hope i'm making sense.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> how do i make the shortcut via the command line because it will be something like this for 100+ pcs
If you know the names of the servers, put them in a text file. Then, pass that to a .bat file
servers.txt
makerdp.bat
Run makerdp.bat to make the rdp_server*.bat files.
If you know the names of the servers, put them in a text file. Then, pass that to a .bat file
servers.txt
server1
server2
server3
makerdp.bat
for /f %%a in (servers.txt) do echo mstsc /v:TERMSRV/%%a>rdp_%%a.bat
Run makerdp.bat to make the rdp_server*.bat files.
ASKER
thanks for the help.
rundll32.exe keymgr.dll, KRShowKeyMgr
It should try to log you on automatically afterwards.