search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Powershell | No Comment | 1,576 views | 31/10/2014 17:39

If you create a secure password on PowerShell and output it into a txt file, you can decrypt it on another Windows machine. So we use a predefined user key to create our secure passwords:

There was a question about this post. So how you can create your own key?

So what you need to do is:

1
2
3
4
$SecureKey = New-Object byte[](16)
$RNGCryptoServiceProvider = [System.Security.Cryptography.RNGCryptoServiceProvider]::Create()
$RNGCryptoServiceProvider.GetBytes($SecureKey)
$SecureKey

That will create a random key for you. So you can replace it with predefined key.