PowerShell
PowerShell blog sharing useful tips and tricks to boost efficiency, published by Peter Whyte, an experienced Microsoft SQL Server Database Administrator.
-
List Installed Programs with PowerShell
List installed programs with PowerShell from the Uninstall registry keys, search and export the list, use winget list for Store apps, and why Win32_Product is the one to avoid.
-
Copy Files to a Remote Host with PowerShell
Copy-Item has no -ComputerName parameter, which is why the command you copied off the internet fails. The working form is -ToSession with a PSSession, and here is how to do it for one host and for several.
-
Get a File Hash in PowerShell (Verify a Download)
Get a file hash in PowerShell with Get-FileHash, compare it to the hash a publisher lists to verify a download, switch to MD5 or SHA512, and the algorithms PowerShell 7 dropped.
-
Find What Is Filling Your C: Drive with PowerShell
C: is nearly full and you do not know why. Read-only PowerShell commands to size every top-level folder, list the largest files, and check the usual culprits: WSL and Docker disks, temp folders, the Windows Update cache and the recycle bin.
-
Install PowerShell 7 on Windows and Keep Windows PowerShell 5.1
PowerShell 7 installs next to Windows PowerShell 5.1, not over it. winget, the MSI for servers, what the Store package cannot do, and the places the 2 versions keep separate: profiles, policies, modules.
-
PowerShell for Windows Admins: The Complete Guide
Every PowerShell guide on this site grouped by task: files and folders, CSVs, the Windows Firewall, scheduled tasks, and the cmdlets worth knowing by heart.
-
How to Export Data to CSV in PowerShell
Export-Csv turns any PowerShell output into a spreadsheet. The three things worth knowing are -NoTypeInformation, calculated properties, and what encoding does to Excel.
-
How to Rename Multiple Files at Once with PowerShell
Renaming a hundred files by hand is nobody’s afternoon. Rename-Item with a script block does it in one line, and -WhatIf shows you the result before it happens.
-
How to Search for Text Inside Files with PowerShell
Select-String is the PowerShell answer to grep. It searches inside files, reports the line number, and works recursively across a whole folder tree.