AES encryption on files using PowerShell
问题 I was able to AES encrypt files successfully using this script here, using Windows 10, PowerShell version 5.1. When I tried running it on Windows 7, PowerShell v2.0, I get an error: New-CryptographyKey : You cannot call a method on a null-valued expression. At C:\Users\IEUser\Desktop\enc.ps1:399 char:27 + $key = New-CryptographyKey <<<< -AsPlainText + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException