Due to recent changes in global privacy and data protection laws ( GDPR & Israeli Privacy Law)
I had to find a quick and easy way to send encrypted PDF files by email.
So, after 6 hours of searching and writing i finally managed to create a workaround
At first I found this Password Protect PDF document script: https://efcomputer.net.au/blog/password-protect-pdf-document/
and i used a part of the code that responsible for encrypting the file (Thanks:) )
So the following PowerShell script will Encrypt PDF files and send them by Email.
There are two folders, one with an English based form and the other with an Hebrew based form.
It looks like this
Have fun 🙂