Yup, you’ve heard of it. You want to use it because everyone is talking about it. They say, “It’s soooooo awesoooommmmmeeee man, you gotta powershell it up!”
I also jumped on that ship and started into the powershell adventure.
Before we get into any powershell fun, we need to figure out where to go to use powershell.
Even before that, we need to figure out if we even HAVE powershell:
- Go to Run and type in powershell, if you have it, a new powershell window will pop up.
IfÂ you don’t have powershell, you should get powershell v2. GOTTA get that v2.
You have two options if you want to do some powershelling. You can use Windows Powershell or you can use Windows Powershell Integrated Scripting Environment (ISE).
I recommend using the ISE. It’s makes life 1000x easier.
If you want to run scripts from regular powershell, it’s not as easy as it seems.
- Are you even allowed to run powershell? Probably not off the bat.
The FIRST thing you need to do is check if you can run scripts or not.
To do this type in Get-ExecutionPolicy
Now, if you haven’t run powershell before it’s probably set to restricted.
To change this you need to run this command:
Set-ExecutionPolicy (whatever option you choose)
What are your options?
- Restricted – Can’t do jack. No scripts for you.
- RemoteSigned – all downloaded scripts have to be signed but yours are fine
- Allsigned – Only scripts that are signed and trusted can be run.
- Unrestricted -FREEDOM! You can run any untrusted script.
Once you figure out which execution policy you want, you can run scripts.
Your other option here is go use the ISE. The ISE is very user friendly. You can type out your whole scrip, hit run, and bammajamma = scriptness!
“Do I even have the ISE?” Well, go to your windows search and type in ISE. If nothing shows up, you probably don’t have it installed.
It’s super easy to install. Just open up a new powershell window and type in: Import-Module ServerManager; Add-WindowsFeature PowerShell-ISE
You should get a nice pretty:
Now you are ready to go! So…..powershell away. More to come in my adventures in powershell.