Monday, June 22, 2015

Security measure in PowerShell Script

Security in my Day-to-Day script

I don't know about you, but, me as a Network Admin, my PowerShell is always open. By PowerShell, I mean ISE because I create a DayToDay.ps1 script.
All commands I used every day are there and I have some sensitives. 

But no one is perfect, so the risk to hit the F5 to run all the script is there. So I show you a little trick to prevent this type of error that can cost you your job.
be careful
Think before, not after.

The Trick

Put this little word at the beginning of your script :

 break  

This little work stops your script is your run it by accident. After that, to use your script, you just have to select what you want and hit F8.

This little trick can save you a lot of trouble.

Have a good day.

J.

No comments:

Post a Comment