PowerShell PGP Decryption
In this case, I am taking an PGP encrypted file, decrypting it, creating an archived version of the file, and then moving it to its new location Gunna be honest, this code is SUPER temperamental. Sometimes it doesn't want the credentials. Some times it won't run it with out it. Use at your own risk. It works, it just...is a diva as far as scripts go. #Date Variables $CurrentDate = Get-Date $Date_Append = Get-Date -Format "yyyyMMdd" $DatetoDelete = $CurrentDate .AddDays(-182) ##Declared locations, separated for simi reusability $Key_Location = "YOUR-KEY-HERE" $Source_Location = 'WHERE-IS-THE-FILE.CSV' $Destination_Location = 'WHERE-IS-IT-GOING' $CopySource_Location = $Destination_Location + "FILENAME" $Archive_Location = "ARCIVE-GO-HERE\" $Archive_FilePath = $Archive_Location + "MY-fILENAME" + $DateF_Append + ".csv" $Archive_SourceFilePath = $Archive_Location + "MYFILE.CSV...