Introduction to Windows PowerShell
Windows PowerShell is a Windows command-line shell designed especially for system administrators. Windows PowerShell includes an interactive prompt and a scripting environment that can be used independently or in combination. Windows PowerShell introduces the concept of a cmdlet (pronounced “command-let”), a simple, single-function command-line tool built into the shell. Windows PowerShell is a command-line interface for Windows computers. A command-line interface (CLI) is a program for telling your computer to do tasks using typed commands. It makes it possible to automate tasks and to do many things with one command.
Windows PowerShell is an evolution of the command line – a combination of a DOS shell and scripting environment. It can help with repetitive tasks; processes acting on many files at once, automating and scheduling tasks, and configuring Windows components and services. PowerShell is not only for running DOS commands, it is far more flexible than that. It supports complex decision making, connecting to a wide variety of data sources, and even building graphical user interfaces.
PowerShell is now an essential skill for IT and server administrators, and is often used when deploying maintenance scripts across an entire organization. It is now an essential requirement / skill for a Systems Administrator. So, let us start learning PowerShell. Here, you will learn What PowerShell is, what it’s used for, and how to use it.
What is PowerShell?
PowerShell is Microsoft new Command Line Interface for Windows systems, it provides access to:
- Existing Windows Command Line tools.
- PowerShell Cmdlets (PowerShell own Commands)
- PowerShell Functions
- Access to the .Net Framework API
- Access to WMI (Windows Management Instrumentation
- Access to Windows COM (Component Object Model)
- Access to function in Windows DLL (Dynamic Linked Libraries)
- Access to different third party APIs like VMWare, Citrix, Microsoft Exchange, Office 365 and many more.
Just press Windows Key and type “powershell”.
PowerShell and PowerShell ISE are the tools we are going to use to learn and create PowerShell scripts. PowerShell ISE is PowerShell Integrated Scripting Environment to create PowerShell scripts.
The PowerShell Console
Windows PowerShell System Requirements:
PowerShell is installed by default on all Microsoft Operating Systems
To know the version of PowerShell installed on the system, type Get-Host or $PSVersionTable . This will display the version of PowerShell installed.
Getting Help: Get-Help cmdlet is used to get help. Get-Help is used in combination of other cmdlets.
Update-Help # Will update the help (may take some time depending the internet connection). Get-Help Get-Process -Online # Will open an online help in a browser.
Now, let us start with Basics of PowerShell.