Powershell is an versatile scripting language that can be used in automation and administration of a wide number of techologies such as by using;
- DSC to automate Windows deployment
- Automation to manipulate Windows roles & features, IIS, DNS, DHCP
- Voice Commands to Automate Workspaces
- Scripting for toolmaking to create applicaitons & systems
- Connection strings to manipulate Databases MySQL, Oracle, SQL SERVER
- Third party Modules to automate Cloud Servers AWS, Azure
- API's to manipulate and control websites/apps
- .COM objects to control any desktop software
- WMI objects to query operating systems information
- WinRM to remote onto any device on any network
- Workflows to test Software
- .NET Classes to take control of Windows and start developing
Posh Python provides the complete knowledge of PowerShell in its entirety of uses within the technoloigcal world from Automation through to Artificial Intelligence. Keep reading to learn what is PowerShell.
At anytime please go to the Vocabulary web page located here to familiarise yourself with the terminology used throughout this site.
What is PowerShell
PowerShell is both an programming language and a command line program developed by Microsoft based on the .NET Framework. PowerShell is the default native programming language and command line shell bundled with Windows Operating systems.
PowerShell programming language is known for encapsulating functions into wrapper like commands known as cmdlets with a verb-noun written structure which gives PowerShell its fame as a scripting language by shortening functions such as .NET classes into simple commands.
PowerShell commands are typed at the PowerShell program interface to interact with the operating system. PowerShell is open source and has cross-platform support with Windows, MacOS and certain Linux distributions.
PowerShell can execute the following commands. cmdlets (.NET Framework programs designed to interact with PowerShell), PowerShell scripts (files suffixed by .ps1), PowerShell functions and standalone executable programs
PowerShell provides full access to COM and WMI enabling automation tasks in local and remote operating systems.
Microsoft constantly updates PowerShell with new command at every update to further expand the capabilities of PowerShell. nap-ins and modules both developed by Microsoft and open source can be imported into PowerShell session to extend the command capability.
The file extensions associated with PowerShell are;
- PS1 – Windows PowerShell shell script
- PSD1 – Windows PowerShell data file (for Version 2)
- PSM1 – Windows PowerShell module file (for Version 2)
- PS1XML – Windows PowerShell format and type definitions
- CLIXML – Windows PowerShell serialized data
- PSC1 – Windows PowerShell console file
- PSSC – Windows PowerShell Session Configuration file
Difference between POSH, PoSH, PS, Powershell & PowerShell?
All of the above are the different acronyms/words that Microsoft has undecidedly used to represent their Shell product from which the community has come to know as PowerShell.
What is a Shell?
A shell is a software like the Internet browsing software you are currently using to browse this Internet website. that has its own underlying text environment for writing programming language commands. PowerShell is both the name of the Microsoft (Windows) developed Shell Software, and also the name of the programming language hence PowerShell can represent both the software and programming language.
How PowerShell works is by users such as yourself opening up the shell that is installed on all modern Windows Computers from Windows 7 to 10. By bringing up the search menu on your computer. Try by pressing the <START> button - In the Search bar type "PowerShell" - Click on application named PowerShell
You can bring up and start either two of the existing PowerShell shell applications.
Why are there 2 programs? PowerShell and PowerShell ISE?
PowerShell - is the default program (Shell software) to run commands on.
PowerShell ISE - In PowerShell ISE the ISE stands for Integrated Scripting Environment
To understand what the difference is we will need to know the difference between the key terms.
Integrated - "With various parts or aspects linked or coordinated." That is to say the PowerShell programming language can be directly typed and run in this software and it will work
Scripting - "A scripting or script language is a programming language that supports scripts: programs written for a special run-time environment that automate the execution of tasks" This means that the top pane (The white pane) that differentiates visually from the standard PowerShell session, has a text field area like Microsoft Word or notepad, that code can be typed into in however formatting is required before running.
Environment - "The surroundings or conditions in which a person, animal, or plant lives or operates." When a PowerShell programming languages command is used in the PowerShell ISE shell, the command is run real-time against the target operating system. e.g. If you wanted to know how many files are in your desktop, the command you run on your shell session .
Therefore we can derive that PowerShell ISE is an software which has capabilities to type PowerShell programming language in commands in a text field and write it all down before running the command in the shell.
We recommend using the PowerShell ISE interface because you can type all your commands in the text field and copy and paste it to the bottom shell command pane before running it