What is PowerShell?
With this post I am opening a new section in my blog. The new section will be tutorials for PowerShell. I will try to provide as much as information as I can on the subject of each post. I hope you will like this section and also provide useful information to those who need it. In this post we will discuss what is PowerShell so we will understand what we are able to do with it and how we are able to do different things.
PowerShell has been developed by Microsoft based on .Net Framework. The purpose of its development is was to help system administrators. It is an interactive shell with scripting features which can be used separately or in combination. You can run cmdlets, executable programs. powershell scripts and powershell functions. Cmdlets (command-lets), as per Microsoft, are simple, single fuction command tools integrated in PowerShell that allow you to combine them for more complex functionality.
PowerShell has been released in November 2006 in Window XP SP2. PowerShell updated to version 2.0 and integrated in Windows 7 and Windows Server 2008 R2. The current version of PowerShell is 6.0. PowerShell 6.0 is a major update. PowerShell 6.0 is now able to run on Windows, Linux and MacOS. PowerShell 6.0 is using .Net Core and this is the reason that now you are able to run it on any operating system. You can run PowerShell 6.0 parallel to previous versions of PowerShell. The executable has been renamed from powershell.exe to posh.exe. PowerShell 6.0 is not as powerful as Windows Powershell yet as it relies on .Net Core, which has less features than .Net Framework. Note here that you will not find PowerShell 6.0 installed on Windows by default. PowerShell 6.0 works differently and many of the scripts that you may write on Windows PowerShell will not work with PowerShell 6.0. As this is only a very brief explanation about PowerShell you better perform your research for better understanding. Espesially if you are interested on PowerShell 6.0, then you need to understand the difference between Windows PowerShell and PowerShell Core 6.0.
Below are the main changes between PowerShell and PowerShell Core:
|1.0 to 5.1
|Only Windows (Client + Server)
|Windows, Linux, and MacOS
|Depends on .NET Framework Runtime
|Depends on .NET Core Runtime
|pwsh.exe on Windows and pwsh on MacOS and Linux
|Set to Desktop
|Set to Core
|Future Updates for
|Bug fixes and Security Updates only
|Feature Update, Bug Fixes as well as Security Updates
As per Microsoft, Powershell 6.0 is fully supported on the below:
- Windows 7, 8.1, and 10
- Windows Server 2008 R2, 2012 R2, 2016
- Windows Server Semi-Annual Channel
- Ubuntu 14.04, 16.04, and 17.04
- Debian 8.7+, and 9
- CentOS 7
- Red Hat Enterprise Linux 7
- OpenSUSE 42.2
- Fedora 25, 26
- macOS 10.12+
There are also community packages for the following platforms but are not supported by Microsoft:
- Arch Linux
- Kali Linux
- AppImage (works on multiple Linux platforms)
And also experimental, not supported for the below:
- Windows on ARM32/ARM64
- Raspbian (Stretch)
On each of the following post of this category we will select a subject and analyse it so we will understand how it works.
We will be able to get information from our systems.
We will see how we will find information about commands and start building our scripts.