Introduction to PowerShell

Introduction to Windows PowerShell Windows PowerShell is a Windows command-line shell designed especially for system administrators. Windows PowerShell includes an...

Read more

Run First Command

Run your first command Open PowerShell and type Get-Host You will get the installed version details along with some other...

Read more

Variables

We use variables to store all types of values. PowerShell is an Object Oriented Scripting Language. PowerShell works with objects,...

Read more

Data types

Working with PowerShell Data types, PowerShell Variables Windows PowerShell uses the Microsoft .NET Framework data types. Whenever you use PowerShell, whether...

Read more

Operators

Operators and expressions – Arithmetic, assignment, comparison, pattern matching logical and bit wise operators PowerShell includes the following comparison operators:...

Read more

Pipeline

PowerShell Pipeline ( | ) : PowerShell pipeline tells PowerShell that you want to take the output of one command...

Read more

Scripting

What are PowerShell Scripts? PowerShell scripts are lists of commands executed by PowerShell scripting engine. They are text documents with...

Read more

Flow Control

PowerShell flow-control statements: Conditional Statements, Loop Statements, Break and Continue, Switch Statement. Scripting, flow control (if-elseif-else, while loop, do-while loop, for loop,...

Read more

Functions

PowerShell Functions: PowerShell Functions are extremely useful when working with PowerShell scripts that perform the same tasks repeatedly. You can...

Read more

Error Handling, exceptions and debugging

One of the key parts of any good PowerShell script is error handling. PowerShell errors are of two types. Terminating...

Read more

Working with Files and Folders

PowerShell – Working with Files and Folders Creating Folders and Files We use the cmdlet New-Item to create a folder or a...

Read more

Working with WMI

Working with WMI (Windows Management Instrumentation) One of the most useful jobs for PowerShell is to create a bank of...

Read more

Remote Sessions and Invoke-Command

PowerShell Remote Sessions: PowerShell Remote Sessions and Invoke-Command: PowerShell Remoting lets you run PowerShell commands or access full PowerShell sessions...

Read more

Regular Expressions

PowerShell – Writing Regular Expressions A regular expression is a string, written using a special regular expression language, that helps...

Read more

Parse and scrape a web page

Parse and scrape a web page Invoke-WebRequest: The Invoke-WebRequest cmdlet sends HTTP, HTTPS, FTP, and FILE requests to a web page or...

Read more

Reading XML with PowerShell

Reading XML with PowerShell We can read XML files using PowerShell. For example, we have the following content in foods.xml...

Read more

Managing Registry with PowerShell

Managing Registry with PowerShell Managing registry with PowerShell: Registry keys are items on Windows PowerShell drives, working with them is...

Read more

GUI Forms PowerShell

GUI Forms PowerShell Windows PowerShell also supports building of Graphical User Interface (Forms). Many of the GUI administration tools available...

Read more

Configure WinRM for HTTPS

Configure WinRM for HTTPS manually Configuring for HTTPS involves following steps. Check whether WinRM service is runningCreate HTTPS listenerAdd firewall...

Read more