PowerShell Tutorials [Beginners + Advanced]

If you want to learn PowerShell, check out all the tutorials on this page. I have added a lot of tutorials for beginners as well as for professionals who have knowledge of PowerShell before.

If you are an absolute beginner in PowerShell, I highly recommend starting with our PowerShell tutorials for beginners. And then move to our advanced PowerShell tutorials.

If you want to become a SharePoint developer or a SharePoint pro, then knowledge of PowerShell is a must. I have added a list of PowerShell SharePoint tutorials you can follow and implement in day-to-day project activities.

As you might already know, Microsoft Teams is quite popular now; I have listed a few tutorials on PowerShell with Microsoft Teams.

All our PowerShell examples are tested and working fine in my system, and I hope it will work on your system as well. Let me know if you are facing any issues while expecting the PowerShell scripts.

So, let us start.

PowerShell tutorials for beginners

Here is the list of beginner tutorials in PowerShell.

TutorialsDescriptions
Windows PowerShell ISELearn how to use Windows PowerShell ISE to write and debug PowerShell script.
How to Run PowerShell Script in Visual Studio CodeKeep reading to know more on how to run PowerShell script using Visual Studio Code with this complete tutorial.
PowerShell Naming ConventionsCheck out the details of PowerShell naming conventions with examples.
PowerShell Variable Naming ConventionsThis PowerShell tutorial explains everything about PowerShell variable naming conventions.
PowerShell ExamplesHere is the list of 51 PowerShell examples.
PowerShell global variableThis tutorial explains how to create and use PowerShell global variables.
PowerShell FunctionsThis tutorial explains what a function is in PowerShell, its syntax, and how to call a function in PowerShell with examples.
PowerShell Function With ParametersUnderstand with various examples how to use the PowerShell function with parameters.
PowerShell reference variableLearn how to work with PowerShell reference variables with examples.
PowerShell ArrayLearn everything about the PowerShell array.
PowerShell try catch with examplesLearn how to implement try catch in PowerShell with examples.

Advanced PowerShell tutorials

After finishing the above beginner’s tutorials, start with these advanced PowerShell scripting tutorials.

TutorialsDescriptions
PowerShell create log fileLearn how to create a log file in PowerShell with date.
PowerShell get-date cmdletsWe use the PowerShell get-date cmdlets to get the current date and time.
PowerShell Get-Date FormatCheck out various PowerShell Get-Date format with examples.
PowerShell Get File Last Modified DateLearn how to get the file last modified date in PowerShell.
PowerShell Get-Date Minus 1 DayThis tutorial explains an example of PowerShell Get-Date Minus 1 Day.
PowerShell Get-Date To StringExamples of PowerShell Get-Date To String
PowerShell Get-Date Add DaysExamples of PowerShell Get-Date Add Days
PowerShell If Date Is Older Than 30 DaysLearn how to check if date is older than 30 days using a PowerShell script.
Get-Date Without Time in PowerShellThis PowerShell tutorial explains how to get a date without time.
PowerShell get-childitem sort by datePowerShell get-childitem sort by date with examples.
PowerShell Get-date Format MillisecondsLearn about how to get-date format milliseconds in PowerShell.
PowerShell get file sizeThis tutorial explains how to get file size using PowerShell.
PowerShell create file if not existsThis tutorial explains how to create a file if it does not exists using PowerShell.
PowerShell create folder if not existsHere, you will learn how to create a folder if it does not exists using PowerShell.
PowerShell check if file modified in last 24 hoursLearn how to check if a file is modified in the last 24 hours using PowerShell.
PowerShell csv to arrayLearn how to create an array from a CSV file in PowerShell.
PowerShell ArrayListLearn how to create and use ArrayList in PowerShell.
How to loop through a PowerShell arrayThis tutorial explains how to loop through an array in PowerShell.
PowerShell Copy ItemLearn how to copy items in PowerShell.
PowerShell Replace() MethodThis PowerShell tutorial explains how to use the replace() method with examples.
PowerShell Replace with Regular Expressions (regex)Learn how to use PowerShell replace() with regular expressions.
Replace a String in an Array Using PowerShellLearn how to replace a string in an array using PowerShell.
How to Replace String in PowerShellThis tutorial explains, different ways to replace a string in PowerShell.
PowerShell unblock-fileRead a complete tutorial on PowerShell unblock-file.
Get Current Function Name in PowerShellLearn how to get the current function name in PowerShell.
Set Environment Variables Using PowerShellThis PowerShell tutorial explains how to set environment variables in PowerShell.
PowerShell Function Array ParametersLearn everything about PowerShell function array parameters.
Call Function in If Statement in PowerShellThis tutorial explains how to call a function in if statement in PowerShell.
PowerShell Function Return ValuesLearn everything about PowerShell function return values.
How to Exit a Function Without Stopping the Script in PowerShell?Learn how to exit a function without stopping the script in PowerShell.
Replace Semicolon with Comma in PowerShellLearn how to replace a semicolon with a comma in PowerShell.
Replace String Containing Double Quotes in PowerShellKeep reading to know how to replace a string containing double quotes in PowerShell.
How To Check If Array Is Empty In PowerShell?Learn how to check if an array is empty in PowerShell.
Access First Item In an Array In PowerShellThis PowerShell tutorial explains how to access the first item in an array in PowerShell.
Replace Strings Containing Backslashes in PowerShellLearn how to replace strings containing backslashed in PowerShell.
Get The Last Item In an Array in PowerShellCheck how to get the last item in an array in PowerShell.
Replace Carriage Returns in Strings Using PowerShellThis PowerShell tutorial explains how to replace carriage returns in strings using PowerShell.
Replace String Containing Special Characters in PowerShellLearn how to replace strings containing special characters in PowerShell.
Convert Array To Comma Separated String In PowerShellThis tutorial explains how to convert an array to a comma-separated string in PowerShell.
Check if an Array Contains a String in PowerShellLearn how to check if an array contains a string in PowerShell.
Split Comma Separated String To Array In PowerShellIn this PowerShell tutorial, I will explain how to split comma-separated string to array in PowerShell.
PowerShell Replace String Before CharacterLearn how to replace string before character in PowerShell.
Remove Empty Lines from an Array in PowerShellThis PowerShell tutorial explains how to remove empty lines from an array.
Replace String In JSON File Using PowerShellKeep reading to learn how to replace strings in JSON files in PowerShell.
Get Unique Values from an Array in PowerShellLearn how to get unique values from a PowerShell array.
Pass Objects to Functions in PowerShellThis PowerShell tutorial explains how to pass objects to a PowerShell function.
Replace String in XML File using PowerShellLearn how to replace a string in an XML file using PowerShell.
Get the Highest Number in an Array in PowerShellLearn how to get the highest number in an array in PowerShell.
How To Compare Array Of Objects In PowerShell?Learn how to compare an array of objects in PowerShell.
Sort Array Of Objects In PowerShellThis PowerShell tutorial explains how to sort an array of objects in PowerShell.
Convert String to DateTime in PowerShellLearn how to convert string to datetime in PowerShell.
Replace a String in Text File with PowerShellLearn how to replace a string in a text file with PowerShell.
Split an Array into Smaller Arrays in PowerShellLearn how to split an array into smaller arrays in PowerShell.
Loop Through an Array of Objects in PowerShellLearn how to loop through an array of objects in PowerShell.
Convert Multiline String to Array in PowerShellLearn how to convert multiline string into an array in PowerShell.
Access Array of Objects in PowerShellLearn how to access an array of objects in PowerShell.
Filter Array of Objects in PowerShellLearn how to filter an array of objects in PowerShell.
Format An Array Of Objects As Table In PowerShellLearn how to format an array of objects as table in PowerShell.
How to Check if a Variable is Null or Empty in PowerShell?Learn how to check if a variable in null or empty in PowerShell.
How to Convert String to Integer in PowerShell?Learn how to convert string to integer in PowerShell.
ConvertTo-SecureStringLearn how to Convert String to SecureString in PowerShell with examples.

SharePoint PowerShell tutorials

Here is the list of SharePoint PowerShell tutorials.

TutorialsDescriptions
SharePoint Management ShellThis tutorial explains how to use the SharePoint Online management shell.
exception calling “executequery” with “0” argument(s): “the remote server returned an error: (403) forbidden.”Learn how to fix the error “exception calling “executequery” with “0” argument(s): “the remote server returned an error: (403) forbidden.”.
connect-msolservice not recognizedThis tutorial explains how to fix the error “connect-msolservice: the term ‘connect-msolservice’ is not recognized as a name of a cmdlet, function, script file, or executable program.”.
connect-sposervice not recognizedThis tutorial explains how to fix the error “connect-sposervice: the term ‘connect-sposervice’ is not recognized as a name of a cmdlet, function, script file, or executable program.”.
the term ‘get-spweb’ is not recognized as the name of a cmdletThis tutorial explains how to fix an error “the term ‘get-spweb’ is not recognized as the name of a cmdlet” in SharePoint Online.
Missing argument in parameter list PowerShellThis PowerShell tutorial explains how to fix the error “missing argument in parameter list”.
connect-sposervice : the remote server returned an error: (403) forbidden.This tutorial explains how to fix the error “connect-sposervice : the remote server returned an error: (403) forbidden.”.
Remove-SPOSite Access denied. You do not have permission to perform this action or access this resourceThis PowerShell tutorial explains how to fix the error “Remove-SPOSite Access denied. You do not have permission to perform this action or access this resource” that comes while working with SharePoint Online.

Microsoft Teams PowerShell tutorials

Here is the list of PowerShell commands to work with Microsoft Teams.

TutorialsDescriptions
How to connect to Microsoft Teams using PowerShellThis PowerShell tutorial explains how to connect to Microsoft Teams using PowerShell.

PnP PowerShell SharePoint Tutorials

Here is the list of PnP PowerShell SharePoint tutorials.

TutorialsDescription
install pnp PowerShell for SharePoint OnlineLearn how to install PnP PowerShell for SharePoint Online.
Delete all SharePoint list items using PnP PowerShellThis tutorial explains how to delete all SharePoint list items using PnP PowerShell.
SharePoint PnP PowerShellThis tutorial explains contains SharePoint PnP PowerShell examples.
Download multiple files in SharePoint using PnP PowerShellThis tutorial explains how to download multiple files in SharePoint using PnP PowerShell.

Conclusion

I hope after following the above PowerShell tutorials, you will be confident working with PowerShell in SharePoint, Microsoft Teams, etc. I have also explained how to work with PnP PowerShell in SharePoint.

>