Powershell Basics
Last updated
Last updated
The following goes over Powershell and the basics
PowerShell is a powerful task automation and configuration management framework from Microsoft. It includes a command-line shell and scripting language, designed to help professionals control and automate the administration of Windows and applications.
Key Features:
Cmdlets: Lightweight commands within PowerShell.
Pipelines: Pass outputs from one cmdlet as inputs to another.
Scripting Language: Create scripts to automate tasks.
Automation: Simplify complex and repetitive tasks.
Object-Oriented: Operates with objects, not just text.
For Windows Users:
Check for Pre-Installed PowerShell:
Most Windows versions come with Windows PowerShell pre-installed.
Open PowerShell: Search for "PowerShell" in the Start menu and launch it.
Install PowerShell Core:
Download the latest version from the .
Follow the installation prompts.
Download and Install:
Follow platform-specific installation instructions provided.
Download and run the latest installer from the PowerShell GitHub releases page to update.
PowerShell commands, or cmdlets, use a Verb-Noun naming convention:
Examples:
Common Verbs:
Get
: Retrieve data
Set
: Change data
New
: Create a new resource
Remove
: Delete a resource
Start
: Begin an operation
Exercise 1: Open PowerShell
Windows: Search for "PowerShell" in the Start menu and open it.
macOS/Linux: Open your terminal and type pwsh
to start PowerShell Core.
Exercise 2: Run Basic Commands
List all running processes:
Get help for a cmdlet:
Retrieve the current date and time:
Exercise 3: Explore PowerShell Help
Update the help system:
Get detailed help for a cmdlet:
Exercise 4: Check Parameters of a Given Command
Visit the .