What is Windows Powershell?
Windows Powershell is an object-oriented programming language and functional programming language developed for system administrators and power users. Powershell is an explorer’s scripting language, with built in help, command discovery and can access .NET Framework. Powershell is based on Microsoft .NET that contains Cmdlet ( pronounced as “command-let“). Cmdlets are very small .NET classes that appears as a system commands, which are used in Windows Powershell environment.
- What is Powershell?
- What is a Shell?
- What is windows powershell cmdlets?
- How to open powershell in Windows?
- How to download and installing on macOS?
- How to run Powershell on macOS?
What is a Shell?
A shell is an interface that allows users to interact with Operating system(OS) and it is not considered as an Application. Shell allow users to run other applications. In UNIX, Linux and VMS, the shell is a command-line interface (CLI), where in Windows and Mac OS X it is a graphical user interface(GUI).
What is Windows Powershell Cmdlet?
The building blocks of Powershell are called Cmdlets. Cmdlet is a lightweight command used in Windows Powershell environment named with verb-noun convention.
- Example :- Get-Date.
We have nearly 96 verbs and to get list of verbs approved by Microsoft, use get-verb cmdlet as shown below.
![cmdlet get verb](https://www.tutorialkart.com/wp-content/uploads/2017/12/cmdlet.png)
Using the verbs, we can learn Windows Powershell easier by learning the meaning of the Cmdlet names that include the verb. For examplestart-service (starts a service) andstop-process(stops a process).
Windows Powershell basics – Getting started.
To get started with Windows Powershell, we must download and install powershell. Before installing Powershell, user must check Powershell installation requirements like.NET framework. PowerShell is provided by default for Windows Vista, Windows 7,Windows 8, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2.
- To open Windows Powershell on windows 7 navigate to Start button and type powershell.
![opening powershell in windows 7](https://www.tutorialkart.com/wp-content/uploads/2017/12/opening-powershell-in-windows-7.png)
- Select “Windows Powershell ISE” for the GUI version.
![powershell version on windows7](https://www.tutorialkart.com/wp-content/uploads/2017/12/powershell-version-on-windows7.png)
How to Install Powershell on Mac OS
Here’s is a tutorial on how to install Powershell on macOS. Before installing powershell in your Mac, it is essential to know the system requirements and softwares.
Requirements.
- Powershell.pkg installer.
- Homebrew package manager.
- Homebrew’s OpenSSL libraries.
- .NET core’s cryptography libraries patch.
Downloading and Installing Powershell.
- Install .NET core on your Mac.
- To download powershell.pkg installer, go to Microsoft GitHub Powershell project and scroll down to macOS 10.12+ and click on .pkg link.
![Powershell for mac os](https://www.tutorialkart.com/wp-content/uploads/2017/12/Powershell-for-mac-os.png)
- Now double-click the .pkg file to install. If you are working with default security settings, you can only install apps from the Mac App Store. Even if you allow identified developers, you will receive this error message: “powershell-6.0.0-alpha.9” can’t be opened because it is from an unidentified developer.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/powershell-on-mac.png)
To resolve the issue, now go to System preference | Security & Privacy and click on Open Anyway as shown below.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/powershell-on-macos.png)
Powershell on your Mac get started and click on continue button to complete your installation.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/Powershell-insalled-successfullt.png)
- Open Powershell terminal and run Install-Module AzureRM.NetCore to Install .NET Core on your mac.
- Now install AzureRM.Netcore module using the
Import-Module
cmdlet.
Homebrew’s OpenSSL libraries
If you have not installed Homebrew on your mac, to install Homebrew enter the command into terminal.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- To install OpenSSL libraries on your mac, enterbrew install openssl as shown below.
![Homebrew's OpenSSL libraries](https://www.tutorialkart.com/wp-content/uploads/2017/12/Screen-Shot-2017-12-15-at-9.18.41-AM-1024x428.png)
How to run Powershell on macOS.
After successful Powershell installation, user can run powershell on macOS. To get started go to launchpad and click on powershell icon.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/powershell-on-mac-1.png)
- Open PowerShell from your launchpad as shown below.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/powershell-on-macos-1-1024x343.png)
- To check Powershell version, use $PSVersionTable cmdlet on powershell terminal.
![](https://www.tutorialkart.com/wp-content/uploads/2017/12/Check-powershell-version-on-your-mac-1024x332.png)