Powershell ZIP Backup Script (with encryption) - KeePass
Introduction
Due to requirements, it was necessary recently, a small
Write script that encrypts a given folder.
There.
a static password didn't seem reasonable, I did
a script that generates the password “random” and
then stored in a KeePass.
The password for this, will
in a simple file, where the respective encrypted string
is saved, this is only “per user” – so user 1 gets
another key file than User 2. (Of course this is only one
“simple” protection method, there are quite possibilities to this system
to bypass (if the User Password can be reset, and
the user can also decrypt everything.)
The
Script should be able to encrypt and decrypt as easily as possible,
a brief statement on the use of the
Scripts.
Use
Encrypt:
./Data backup.ps1 -source <
Decrypt:
/Data backup.ps1 -source <
Configuration
The script provides a small Config block in which the Behavior of the Script can be adjusted: – The main points are shortly torn...
zipdefault => Wenn nichts angegeben wird, dann erstelle entweder eine ZIP oder kopiere den Ordner nur
encryptDefault => Wenn der Parameter -encrypt nicht angegeben verschlüssele das Verzeichnis entweder Standardmäßig oder führe Aktion von <<zipDefault>> aus
filetype => Ausgabeformat (7zip oder zip)
encryptCompleteZipArchive => Entweder wird das gesamte Verzeichnis verschlüsselt (Dateinamen ebenfalls) oder die ZIP kann geöffnet und die Filenames gelesen werden, aber die Dateien selbst sind verschlüsselt
Disclaimer
As always, this is a script that develops for my claims is and are accordingly running on my system... I give no guarantee of function and I accept for damage or other no liability.
File: Download
Back…