Author: Pete
-
How to Change the Default User in WSL
WSL logs you in as whichever account you created first. One command changes that, and it no longer needs you to edit a config file inside the distro.
-
How to Get a Folder Size in PowerShell
Windows Explorer will tell you a folder size eventually. PowerShell tells you in one line, and can do it for every folder on the drive at once.
-
How to Format Dates with Get-Date in PowerShell
Every script that writes a log or names a file needs a date in a specific shape. These are the Get-Date format strings worth committing to memory.
-
How to Get System Information with PowerShell
One block of PowerShell answers the questions you get asked about a server: what it runs, how much memory it has, how long it has been up, and how full the disks are.
-
How to Copy Files and Folders with PowerShell
Copy-Item handles most copying jobs in one line. For very large trees, or anything that needs to resume, robocopy is still the better tool and PowerShell drives it happily.
-
How to Zip and Unzip Files with PowerShell
PowerShell has zipped and unzipped natively since version 5. Two cmdlets cover almost everything: Compress-Archive and Expand-Archive.
-
Git Log by Author
Filter git log by author, why anchoring with $ returns nothing, and counting commits.
-
Show Event Logs in PowerShell
Read Windows event logs with Get-WinEvent, and filter at the log rather than after it.
Three guides collect the posts by the job you are doing rather than by date.
PowerShellFiles, CSVs, the firewall, scheduled tasks WSLInstalling it, distros, files across both worlds Windows AdministrationServers, domains, DNS, the tools worth havingThis site started as a SQL Server blog in 2017 and the archive is still here. The new SQL Server writing, and all the scripts, moved to a site of their own.
sqldba.blogScripts, error library, wait types, SSMS- Linux & WSL (28)
- Microsoft SQL Server (51)
- Other (13)
- PowerShell (53)
- Windows Server Admin (37)