I am looking to export Windows credentials to another Windows machine. So far in Windows, all I have is the GUI option to backup / restore, but no options in CMDKEY to backup / restore all Windows credentials. Is there a command line equivalent to the following?
Asked
Active
Viewed 9,282 times
1 Answers
2
First of all, from a security stand point, having an inbuilt command line utility to export security credentials can lead to them being compromised. Someone who gains unauthorized access to your machine remotely to run shell commands or install an program that executes to dump your credentials and then send them somewhere else can do that. That said, I have not come across any inbuilt tools to do that. BUT, that doesn't mean you can't.
cmdkey
is a tool that you can use to manage credentials from the command line.- There is a PowerShell tool by Microsoft called PowerShell Credentials Manager that shows all your credentials. You can then pipe that to an output file. https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Credentials-d44c3cde
Show all: CredMan.ps1 -ShowCred | Out-File **your-file**
Add New
.\CredMan.ps1 -AddCred -Target 'DemoTgt' -User 'DemoUser' -Pass 'DemoPass'
Remove .CredMan.ps1 -RemCred **cred name**
- Read on some ways an attacker can compromise your system in blog post Dumping Windows Credentials.

Peter Mortensen
- 30,738
- 21
- 105
- 131

jmuchiri
- 314
- 4
- 7