Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.
When you install Windows, by default, the execution of scripts is prevented. If you try to run something on a new machine, you might get this error:
The error message lets you know this is an issue with the Execution Policy. There’s a URL to help you, which takes you to the “About Execution Policies” page.
You can set your execution policy to allow scripts, and Microsoft has a document that explains the implications.
For my laptop, I usually go with unrestricted, since I create and run lots of random PoSh scripts.
I DO NOT DOWNLOAD SCRIPTS and run them from the Internet. Be very, very careful about running scripts.
From an administrator PoSh console, you can change this.
Read the docs and be sure you understand what is going on. You can change to signed scripts and then learn how to do this, which likely makes some sense for privileged workstations and building scripts in production environments.
SQLNewBlogger
I had to set this on a new machine recently and decided to blog about it, since I’ve had to look it up over and over. Hopefully this will help me remember how to do this.
This took less than 10 minutes and it’s a good blog for you. Learn about signing and talk about why that is or isn’t appropriate for you in your own post.