What is it?
PowerShell (the application) is an application that is primarily used to automate tasks and perform complex tasks with ease. Think of it like the far more attractive cousin of Windows Command Line or CMD as it is casually known. PowerShell allows advanced users to automate boring tasks to free up time for more important tasks, such as making coffee. It even comes prepackaged with command aliases for bash commands to help with admins coming from the Linux world, so you can ‘clear’ to your hearts content!
PowerShell (the language) is a programming language that sacrifices some of the control that you get with traditional programming to provide a much easier to use and understand syntax.
Simply look at the commands and you see the convention:
Write-Output = writes a string as an output,
Get-ComputerInfo = gets computer information
PowerShell functions generally follow this convention:
VERB (get, set etc.)–NOUN (Membership, Object etc.).
You can also use traditional commands like rmdir, shutdown and ping in PowerShell.
What can you do with it?
Primarily PowerShell is used by admins to free up their time by completely automating tasks. The limits of PowerShell are only determined by how much time you want to spend on a certain task. You need to ask yourself if the time you are willing to invest in PowerShell to automate the task is worth it, or if it would be more efficient to manually do the task. If you ask me, the answer will always be to automate as much as possible!
If you need to do something more than once, just script it! Even if you end up never using it, in my experience the process of designing the structure of the script helps with writing future scripts.
PowerShell scripting doesn’t always have to be used for work – for example, I once created a script on my home PC so I can start my “everyday applications” with a single button press. This is especially useful when you are running applications that require admin rights as you can use this to avoid having to enter your admin password more than once.
In the Service Desk environment, PowerShell really starts to shine. For example if you step back and look at your open tickets and see the majority are asking for the same thing, it might be time to start thinking of a way to get it all done with a single click. PowerShell is often the way to do this.
In conclusion, PowerShell is a tool that everyone can benefit from learning; both in and outside of the work environment. Almost anything you can do on a computer can be done – and automated – with PowerShell.