远程桌面文件

格式

key:type:value

Remote.RDP

authentication level:i:2
enablecredsspsupport:i:0
full address:s:1.2.3.4
username:s:MY_USER_NAME
password 51:b:010101

密码

Add-Type -AssemblyName System.Security
[System.Text.UnicodeEncoding]$encoding = [System.Text.Encoding]::Unicode
[byte[]]$passwordAsBytes = $encoding.GetBytes(YOUR_PASSWORD_HERE)
[byte[]]$passwordEncryptedAsBytes = [System.Security.Cryptography.ProtectedData]::Protect($passwordAsBytes, $null, [System.Security.Cryptography.DataProtectionScope]::CurrentUser)
[string]$passwordEncryptedAsHex = -join ($passwordEncryptedAsBytes | ForEach-Object { $_.ToString("X2") })
return $passwordEncryptedAsHex

ref:https://github.com/RedAndBlueEraser/rdp-file-password-encryptor

Ref

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files

posted @ 2021-11-25 21:35  talentzemin  阅读(70)  评论(0编辑  收藏  举报