As of writing, I am working on a very controlled client environment (i.e. Citrix session) where the home drive is in a network share, and the machine session has a locked policy of only allowing signed poweshell scripts to execute.
I have my scripts in the Powershell folder which then gets this error because they are not digitally signed.
A solution presented is to run a new powershell session with the execution policy for the current user set to Bypass. Normally this needs to be done as an admin but it should be doable using the normal user. I wanted this to be part of my VS Code setup and this is how I configured it:
Go to File->Preferences->Settings dialog (or press Ctrl+,)
In the search box, type in “@feature:terminal integrated.profiles.windows”
Click on the “Edit in settings.json” link to open the correct settings file.
Locate the Powershell entry and add the following argument stanza to the “terminal.integrated.profiles.windows” section.
No time to read through contexts? Jump to the TL;DR; section.
There are use cases that require the secure wiping or deletion of files. There are already a lot of available utilities available in most modern distributions such as srm, swipe, etc. These however entail installing an additional package which is fine for work machines. The use case I had is to securely delete a transient file after it was generated and used in a Continuous Integration server. Installing the secure-delete package is trivial but a base Linux system already has the tool that can do the job: dd
It was the first time to generate and send the report. It deals with downloading a lot of access logs, combining them based on certain scenarios, filtering out the cruft, slicing and dicing per service accessed and then tallying the responses to see if they meet the SLA.
The first manual extraction took around 4 hours to create the report for the most critical service. After that, I sat down and created the bash+awk script to do the slicing, dicing and tallying part. It took me 3 hours to create and test the script but after that I can generate the reports for 6 services in 30 minutes, where the bulk of the time was spent in downloading the latest logs (~10minutes) and pasting the data in Excel to create the “bayoootiful” graphs.
I figured if I can automate the rest then the reports can be generated under 15minutes, and I can hook it up on a continuous service so it will send it automatically every night. After that I can work on getting rid of the need to go through Excel if I can find some API to generate it and publish them as PDFs. JFree perhaps but my Java skills are already rusty. I also need something native if possible as I cannot install stuff on the office machines. The zLinux servers are pretty much off limits though I think there is a python interpreter installed.
One thing I can say is that automation and f/loss rocks. The script is too specific and covered by IPR so I cannot post it here but it is something that most scripters should be able to do.