zettelkasten/OneNoteExport/Technik/Powershell/Windows 10/04_Keepass Howto.md
Ralf Koop 7389e600f9 vault backup: 2023-11-12 11:19:55
Affected files:
2023-11-12 11:19:55 +01:00

2.0 KiB

Keepass Howto

Montag, 23. November 2020

11:02

 

http://blog.bitcollectors.com/adam/2014/04/launching-rdp-keepass-2-x-auto-login/

 

cmd://    cmd /c "cmdkey /generic:TERMSRV/{URL:RMVSCM} /user:{USERNAME} /pass:{PASSWORD} && mstsc /v:{URL:RMVSCM} && timeout /t 5 /nobreak && cmdkey /delete:TERMSRV/{URL:RMVSCM}"

 

Aus <http://blog.bitcollectors.com/adam/2014/04/launching-rdp-keepass-2-x-auto-login/>

 

IN den Option unter URL Schema Overrides eintragen als RDP.

 

 

 

 

 

 

 

https://www.windowspro.de/wolfgang-sommergut/zertifikat-zur-dokumentenverschluesselung-cryptographic-message-syntax-ausstellen

 

 

 

 

 

 

Starten eines Programms direkt aus Keepass mit entsprechenden Credentials :

 

https://www.sans.org/blog/launch-powershell-script-from-within-keepass-and-include-password-secure-string-credential/

 

Kurzform :

 

Powershell script erstellen zB:

Start-Process -FilePath "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -Credential $Creds

 

Diese Script wird dann im Teitel des Keepass Eintrags angegeben.:

Titel : D:\KeePass-2.46\chrome-ps.ps1

 

 

 

URL muss lauten : cmd://powershell.exe -command "{NOTES}"

 

In Notes muss folgdendes drin stehen :

 

$username = '{USERNAME}';

 

$cipherbytes = [System.Convert]::FromBase64String( '{PASSWORD_ENC}' );

 

System.Reflection.Assembly

 

byte\[

 

$plainbytes = [System.Security.Cryptography.ProtectedData]::Unprotect($cipherbytes, $m_pbOptEnt, 0);

 

$password = [System.Text.Encoding]::UTF8.GetString( $plainbytes );

 

$secstring = ConvertTo-SecureString -asPlainText -Force -String $password;

 

$creds = New-Object System.Management.Automation.PSCredential($username, $secstring);

 

$password = $null; Remove-Variable -Name password;

 

{TITLE}

 

 

Muss nicht angepasst werden, einfach so wie es ist, rein kopieren.

 

 

#nochzubearbeiten