What is powershell.
Powershell is an Windows powerful command line tool that used to execute scrpts and program code to automate the repeatative tasks.
By default powershell is installed from windowns7.x version onwards. It is interactive command line tool that inputs a command and send the result to the terminal.
Commands in powershell called cmdlet tha performs actions.
cmdlets are verbal names that contains meaning ful names, example are Get-Location
You can also write a scrips that contains cmdlets and code blocks that saved in a file with extension .ps1
.
Scripts contains multiple cmdlets and code blocks, that executes in sequential order
Features
- Interactive command line: Provides a command line interface that executes commands, and displays the results.
- Cmdlets: Predefined commands written C# language, that performs actions
- Functions: Reusable code executio and provides maitenance
- Cmdlet help: you can get documentation of comlet using help commands
- Comments: Comments are human readabile text,that ignored by powershell interpreter
- Variables: Store the value in a variable, reused across multiple places
- Datastructure: Provides different dstastructures such as arrays and dictionaries
- Conditional Executio: Provides if else, switch conditional statements to executes commands based on condition.
- Loops: Provides iteration with different loop syntaxes.
Latest version of Powershell
Latest powershell version is 7.x that supports windows 10 and 11 version.
Latest Articles
Powershell - Current Username
Multiple ways to know the installed powershell version using cmdlet and script programming.
Posted June 26, 2024 by ‐ 1 min read
Powershell - Run Script from batch
How to execute powershell script from batch file in script programming.
Posted February 28, 2024 by ‐ 1 min read
Powershell - Version
Multiple ways to know the installed powershell version using cmdlet and script programming.
Posted February 28, 2024 by ‐ 2 min read
Powershell - Loops
Learn for, foreach, while, do while, break and continue syntax and examples Powershell scripts in Windows.
Posted January 1, 0001 by ‐ 3 min read
Powershell - Arrays
Learn terminal command line programming scripts in DOS bash shell scripts.
Posted January 1, 0001 by ‐ 4 min read
Powershell - Arrays
Learn terminal command line programming scripts in DOS bash shell scripts.
Posted January 1, 0001 by ‐ 1 min read
Powershell - Datatype
Learn Powershell Datatype tutorial for beginner examples.
Posted January 1, 0001 by ‐ 1 min read
Powershell - Date
Learn Powershell Date object get current date, format tutorial for beginner examples.
Posted January 1, 0001 by ‐ 1 min read
Powershell - Delete
Learn Powershell Delete files and folders with commands and script examples.
Posted January 1, 0001 by ‐ 2 min read
Powershell - Hashtables
Learn Powershell H-ashtable tutorial for beginner examples.
Posted January 1, 0001 by ‐ 2 min read
Powershell - If else
Learn Powershell If else conditional statement tutorials for beginner examples.
Posted January 1, 0001 by ‐ 2 min read
Powershell - Operators
Learn terminal operators logical, comparision, bitwise command line programming scripts in DOS bash shell scripts.
Posted January 1, 0001 by ‐ 1 min read
Powershell - string
Learn Powershell string methods tutorial for beginner examples.
Posted January 1, 0001 by ‐ 2 min read
Powershell - Switch
Learn Powershell Switch conditional statement using string, one line simple logical and or operator tutorial for beginner examples.
Posted January 1, 0001 by ‐ 2 min read
Powershell - Variables
How to declare and use variables in Windows with examples environment variables in windows scripts.
Posted January 1, 0001 by ‐ 3 min read