POWERSHELL: Why the hell “Powershell”?

A Tech Lead by profession, a Data Enthusiast and a forever learner. Experienced in DevOps, Cloud, FullStack Development, Data Science, Machine Learning and AI.
Search for a command to run...

A Tech Lead by profession, a Data Enthusiast and a forever learner. Experienced in DevOps, Cloud, FullStack Development, Data Science, Machine Learning and AI.
No comments yet. Be the first to comment.
Hashnode introduced 'headless' and while having a look at it, It really seemed interesting. It's nice to have a way to play with our publications and posts from Hashnode, outside of Hashnode without tedious data scraping. While reading another blog, ...

While trying to get Red Hat (RHEL9) installed in my WSL (Windows Subsystem for Linux) within my Windows 11 laptop, I stumbled upon the same hurdle I did for installing the older RHEL8. The list of available distros published by Microsoft still does n...

When it comes to collaborative software development, efficiency in communication and planning are critical. GitHub offers a feature called "Code owners" to improve project management and facilitate cooperation. Let's see how this can improve your dev...

PowerShell is a powerful tool, allowing to perform a myriad of tasks with just a few commands. However, there are times when elevated privileges are required to execute certain commands. This is as easy as right-clicking PowerShell and "Run As Admini...

While trying to setup RHEL with WSL 2, I stumbled upon this very helpful blog https://wsl.dev/mobyrhel8/ While doing the setup, I found this zsh theme very nice, and I have been using it since then. The above mentioned blog already has the steps, but...

Well, while we are starting to learn Powershell, just like me many people would have come across the thought “OK, the name sounds cool, it has a fancy logo, seems to be POWERful, I have heard the nerds talk about it, but ….. What the hell is it?”.
This is my first blog post about Powershell and I will try to answer the obvious question “Why the hell do we even need Powershell?”.
Powershell is basically a scripting language provided by Microsoft. It is a task automation and configuration management framework consisting of a classic command-line shell and associated scripting language built on the .NET framework. We all know about VBScript which is quite popular in the Windows scripting world, Powershell is similar, just with a lot more muscle than VBScript could afford to have.
It has full access to COM and WMI which makes Windows administration easier.
It provides you access to both local and remote systems with WSMan and CIM making it easier to communicate with devices.
Along with command-line, it also comes with a GUI-based ISE (Integrated Scripting Environment) where we can write, test, and debug scripts.
It gives you full access to the .NET classes making it easier for C#, C++ programmers, and VBScripters to learn Powershell.
It uses commands called cmdlets (pronounced command-lets), which use a “Verb-Noun” format, hence recognizing what cmdlet to use next becomes obvious. For example, if you want to write something on the host’s screen, the cmdlet for it is “Write-Host”. Want help then just type “Get-Help”.
Powershell has a very elaborate manual/help document integrated with it.
The most powerful thing about Powershell is that, from Windows 2012 onwards, all Microsoft tools like Exchange, SQL, etc. can be managed completely with the help of Powershell.
Unlike VBScript, Powershell makes it difficult to be used for malicious tasks like creating viruses, hence making it secure.
Powershell uses something called “aliases” to retain compatibility with other scripting tools like MS-DOS, Linux Shell, etc. So if you type in Powershell “dir”(DOS) or “ls”(Linux), you still get the results.
And the list goes on ….
So, ultimately answering the question, Powershell is what we can consider to be the best friend for a System-Administrator and other people who want to automate tasks, develop scripts to generate data and reports, and manage Windows applications.
I hope I was able to explain the essence of Powershell and how powerful a tool it is.
Do leave comments and keep visiting this blog for future posts.