PowerShell Tutorials

This page lists every PowerShell tutorial on Collecting Wisdom.

PowerShell: How to Concatenate Strings
PowerShell: How to Replace Text in String
PowerShell: How to Replace Every Occurrence of String in File
PowerShell: How to Replace Special Characters in String
PowerShell: How to Replace Multiple Strings in File
PowerShell: How to Replace Text with Wildcard
PowerShell: How to Replace Double Quotes in String
PowerShell: How to Replace Backslash Characters
PowerShell: How to Rename File Extension of Multiple Files
PowerShell: How to Rename a Folder
PowerShell: How to Rename Multiple Folders
PowerShell: How to Extract Text Between Two Strings
PowerShell: How to Delete All Files with Specific Extension
PowerShell: How to Delete File if it Exists
PowerShell: How to Delete Files Matching a Certain Pattern
PowerShell: How to List All Files in Directory to Text File
PowerShell: How to List All Files in Directory to CSV File
PowerShell: How to List Files in Directory by Date
PowerShell: How to Get Most Recently Modified File in Directory
PowerShell: How to Get List of Files Modified After Certain Date
PowerShell: How to Get Folder Size and File Count
PowerShell: How to Get Folder Size in GB
PowerShell: How to Use Export-Csv with No Headers
PowerShell: How to Use Export-Csv with No Quotes
PowerShell: How to Use Export-Csv with Append
PowerShell: How to Use Export-Csv and Specify Column Order
PowerShell: How to Check if File Contains Specific String
PowerShell: How to Check if File is Empty
PowerShell: How to Create an Empty File
PowerShell: How to Check if File Has Been Modified in last 24 Hours
PowerShell: How to Check if String is Empty
PowerShell: How to Return Multiple Values from Function
PowerShell: How to Use If Statement with Multiple Conditions
PowerShell: A Simple Formula for “If Like”
PowerShell: A Simple Formula for “Not Contains”
PowerShell: How to Check if String Exists in List of Strings
PowerShell: How to Check if String Starts with Specific Value
PowerShell: How to Compare Dates
PowerShell: How to Compare Two Arrays
PowerShell: How to Compare Two Files
PowerShell: How to Compare Two Strings
PowerShell: How to Compare Two Folders
PowerShell: How to Compare Two Times
PowerShell: How to Use Compare-Object and Only Show Differences
PowerShell: How to Create Array from CSV File
PowerShell: How to Calculate Date Difference
PowerShell: How to Format a DateTime
PowerShell: How to Subtract Days from Date
PowerShell: How to Use Get-ChildItem with Filter
PowerShell: How to Use Get-ChildItem to Get Full Path of Files
PowerShell: How to Use Get-ChildItem to Return Files Only
PowerShell: How to Use Get-ChildItem with Multiple Filters
PowerShell: How to Use Get-ChildItem and Exclude Specific Items
PowerShell: How to Use Get-ChildItem and Limit Recursion Depth
PowerShell: How to Find Empty Folders
PowerShell: How to Find Duplicate Values in Array
PowerShell: How to Find All Files with Specific Extension
PowerShell: How to Get String Length of Variable
PowerShell: How to Split String into Separate Variables
PowerShell: How to Split File by Number of Lines
PowerShell: How to Split a String Using Multiple Delimiters
PowerShell: How to Split String Based on Tab Characters
PowerShell: How to Use Get-Date and Display Timezone
PowerShell: How to Get Date Without Time
PowerShell: How to Get Month Name
PowerShell: How to Use Echo with New Line
PowerShell: How to Extract Substring Before Specific Character
PowerShell: How to Extract Substring After Specific Character
PowerShell: How to Extract Only Numbers from String
PowerShell: How to Generate Random Number Between Range
PowerShell: How to Copy and Rename a File
PowerShell: How to Use Copy-Item and Create New Directory
PowerShell: How to Use Copy-Item and Exclude Folders
PowerShell: How to Copy Files from Subfolders to One Folder
PowerShell: How to Get Last Item in Array
PowerShell: How to Get Last Character of String
PowerShell: How to Get Last Folder in Path
PowerShell: How to Get First Character of String
PowerShell: How to Get First Item in Array
PowerShell: How to Get First Line of File
PowerShell: How to Use Get-Content and Skip First N Lines
PowerShell: How to Use Get-Content with Filter
PowerShell: How to Convert String to Double
PowerShell: How to Convert String to Datetime
PowerShell: How to Convert Array to Comma Separated String
PowerShell: How to Convert XLSX to CSV
PowerShell: How to Add Column to CSV
PowerShell: How to Remove Column from CSV File
PowerShell: How to Add Date to File Name
PowerShell: How to Find Position of Character in String
PowerShell: How to Get File Extension
PowerShell: How to Use Get-ChildItem to Return Folders Only
PowerShell: How to Unzip a File to Folder
PowerShell: How to Unzip All Files in Folder
PowerShell: How to Count Number of Lines in File
PowerShell: How to Count Number of Lines in Multiple Files
PowerShell: How to Count Specific Characters in String
PowerShell: How to Subtract Time
PowerShell: How to Get Free Disk Space
PowerShell: How to Merge Multiple CSV Files into One
PowerShell: How to Convert Date to UTC Time
PowerShell: How to Check if Hash Table Contains Specific Key
PowerShell: How to Iterate Over a Hash Table
PowerShell: How to Remove Elements from a Hash Table
PowerShell: How to Convert Hash Table to String
PowerShell: How to Convert Hash Table to CSV
PowerShell: How to Get File Creation Date
PowerShell: How to Use Select-String to Recursively Search for Strings
PowerShell: How to Use Select-String to Search for Multiple Patterns
PowerShell: How to Use Select-String with Exact Match
PowerShell: How to Use Select-String and Output Only Matching Text
PowerShell: How to Use Select-String and Exclude Specific Pattern
PowerShell: How to Move All Files from Folders and Subfolders into One Folder
PowerShell: How to Use Move-Item and Overwrite Existing File
PowerShell: How to Move and Rename a File
PowerShell: How to Remove All Newlines from String
PowerShell: How to Use Import-Csv and Foreach
PowerShell: How to Use Import-Csv with No Headers
PowerShell: How to Use Import-CSV and Extract Specific Columns
PowerShell: How to Use Import-Csv Where Row Contains String
PowerShell: How to Use Group-Object with Multiple Properties
PowerShell: How to Sort by Specific Column
PowerShell: How to Sort a Table with Format-Table
PowerShell: How to Sort an Array of Strings by Date
PowerShell: How to Sort IP Addresses
PowerShell: How to Use Sort-Object with Multiple Properties
PowerShell: How to Use Where-Object in List
PowerShell: How to Use Where-Object with Multiple Conditions
PowerShell: How to Use Where-Object is Not Null
PowerShell: How to Use Where-Object to Filter Dates Greater Than
PowerShell: How to Use Where-Object to Filter for Strings that End With
PowerShell: How to Use -notlike With Multiple Values
PowerShell: How to Append to Text File
PowerShell: How to Insert Line After Matching Pattern
PowerShell: How to Check if Folder Exists
PowerShell: How to Use Multiple Values in Switch Statement
PowerShell: How to Use Regex in Switch Statement
PowerShell: How to Use Switch Statement with Greater Than / Less Than
PowerShell: How to Use Format-Table with No Header
PowerShell: How to Use Format-Table and Control Column Width
PowerShell: How to Format Numbers with Commas
PowerShell: How to Format Numbers to 2 Decimal Places
PowerShell: How to Prompt for Input from List
PowerShell: How to Trim Trailing Spaces from String
PowerShell: How to Trim Leading Spaces from String
PowerShell: How to Trim First N Characters from String
PowerShell: How to Trim String to Specific Length
PowerShell: How to Remove All Text Before Specific Character
PowerShell: How to Remove Leading Zeros
PowerShell: How to Escape Dollar Signs
PowerShell: How to Get File Name from Path
PowerShell: How to Generate Random Password
PowerShell: How to Use Select-Object to Only Get Property Value
PowerShell: How to Use Select-Object and Rename Property
PowerShell: How to Use Write-Host with Specific Colors
PowerShell: How to Use Write-Host and Display Tab Character
PowerShell: How to Use Write-Host to Display Multiple Lines
PowerShell: How to List All Object Properties
PowerShell: How to Use Add-Member with Multiple Values
PowerShell: How to Filter for Unique Objects
PowerShell: How to Calculate the Average of an Array
PowerShell: How to Slice Arrays
PowerShell: How to Combine Two Arrays
PowerShell: How to Combine Multiple Text Files into One File
PowerShell: How to Combine Path and File Name
PowerShell: How to Use Get-Date with Milliseconds
PowerShell: How to Use Get-Date with 24-Hour Format
PowerShell: How to Use Remove-Item and Skip Confirmation
PowerShell: How to Use Remove-Item with Multiple Files
PowerShell: How to Find Minimum and Maximum Values in Array
PowerShell: How to Convert Unix Timestamp to Datetime
PowerShell: How to Use Out-File with No Output Header
PowerShell: How to Use Try / Catch / Finally
PowerShell: How to Use Try Catch and Print Only Error Message
PowerShell: How to Use Get-Service and Filter Results
PowerShell: How to Use Get-Service to Check Status of Service
PowerShell: How to Use Get-Service to Get Startup Type of Service
PowerShell: How to Use Regex to Capture All Matches
PowerShell: How to Split String Based on Regex Pattern
PowerShell: How to Use Regex with -notmatch
PowerShell: How to Use Get-Process to Search for Process by Name
PowerShell: How to Use New-Item and Hide Output
PowerShell: How to Create Folder if it Does Not Exist
PowerShell: How to Use Test-Path with Wildcard Characters
PowerShell: How to Use Test-Path to Check Multiple Paths
PowerShell: How to Use Get-CimInstance with Filter