Don't always start from scratch
- Written by Alexander Riedel
- Last Updated: 19 April 2016
- Created: 28 April 2014
- Hits: 6044
We use scripting to automate tasks that would otherwise be very repetitive. However, when it comes to creating a script most users start with a blank slate, an empty file. Then they hunt for copy and paste sources to start and the script fills with bits and pieces from other places. Next time a new script needs to be created, the same process starts all over again.
PrimalScript has a feature that might just make it easier for you to get started on a new script. You can save any file you have as a template with the content you want and need and the encoding your environment requires.
We create a new PowerShell file from our default templates.
Maybe you don’t like our header, maybe you need some functions in there that you always use. Just modify as desired.
Now select “Save as template” from the backstage menu and give a fancy name. Make sure you use the correct extension, because that will determine the syntax coloring when you create a new file with that template.
In our example here we will name the file “My own PowerShell Template.ps1”
You can then close the file, or use it as a base for further templates you want to create. That’s up to you.
We used a list style control rather than big icons so you have more room for many templates and it also allows you to use longer, more descriptive names.
Questions? Comments? Suggestions? Head on over to our support forum and and let’s hear it.