Blog Posts
-
How to Enable Windows Firewall using PowerShell
Windows Firewall is an essential security feature that protects your system from unauthorized access and threats. If it has been disabled for testing or mistakenly turned off, you can quickly re-enable it using PowerShell. This guide provides a straightforward process to restore your firewall settings and ensure a…
-
How to Disable Windows Firewall with PowerShell
This post provides a demo on how to disable Windows Firewall with PowerShell on a Windows computer. ⚠ Important: Disabling the Windows Firewall is not recommended as it reduces your system’s security. However, there are scenarios, such as troubleshooting, where temporarily disabling the firewall may help identify if…
-
Best Terminal for Windows 2022
This is a post to share an opinion on the best Terminal for Windows 2022. The answer to all our needs in the year 2022 is Windows Terminal. I have a blog post on How to Install Windows Terminal, and here is a link to the main Windows…
-
How to Reboot WSL (Windows Subsystem for Linux)
To restart WSL simply, run wsl –shutdown to stop your WSL distros, then enter back into WSL distro as normal to start it back up again. This post contains a guide to help explain the process. A WSL reboot might be needed if your WSL instance or app…
-
How to Check Table Sizes in SQL Server
In this post, I’m sharing how to check table sizes in SQL Server. There’s many ways to get this information, and whether you prefer using T-SQL scripts for automation, or SSMS tools for quick checks, these methods offer flexibility for different situations as a SQL Database Administrator. If…
-
Creating Folders (If Not Exists) with PowerShell
If you need to create folders or subfolders in PowerShell only when they don’t already exist, this quick script will help. The script uses Test-Path to check if the folder exists before running the New-Item command. This snippet is ideal for anyone searching for a fast and reliable…
-
How to Create New Files & Folders in PowerShell
This is a post on how to create new files and folders using PowerShell. Creating new files and folders in Windows is generally done via GUI. That’s what it’s there for, the simplicity. But when you’re scripting or doing admin work, you might want to create new files…
-
How to Restart Windows Subsystem for Linux (WSL)
If your Windows Subsystem for Linux (WSL) instance encounters errors or you’ve updated the .wslconfig file (e.g., to modify memory limits), restarting your WSL distributions may be necessary. This guide demonstrates two effective methods for restarting WSL distributions: > (Preferred Approach) Run the WSL –Shutdown Command > (Old…
-
How to Upgrade WSL from Version 1 to Version 2
This guide explains how to upgrade your Windows Subsystem for Linux (WSL) distribution from Version 1 (WSL 1) to Version 2 (WSL 2). WSL supports two versions: the original WSL 1 and the more advanced WSL 2. You can install multiple Linux distributions on your system and easily…
-
How to Downgrade from WSL Version 2 to WSL Version 1
In certain development or system administration scenarios, you may need to downgrade your Windows Subsystem for Linux (WSL) distribution from WSL version 2 (WSL 2) to version 1 (WSL 1). While WSL 2 brings many enhancements, such as a real Linux kernel and better performance, there are times…
Useful SQL DBA Scripts
Performance
– Quick Performance Troubleshooting Scripts
– Get Current User Activity & Blocking
– Get Wait Stats & Top Consuming Queries
– Get Database Sizes & Space Used
– Identify Missing & Unused Indexes
High Availability
– Get Always On Availability Group (AAG) Latency
– Get Mirroring Status & Latency
– Get Replication Latency
– Get Last Node Blip in SQL Server FCI
Maintenance
– Get Estimated Database Backup/Restore Time
– Get Last Database Backup Dates/Times
– Get Index & Heap Fragmentation Levels
– Get Table Sizes in SQL
Security & Auditing
– Get SQL User Permissions and Roles
– Creating SQL Users on Availability Groups
– Audit Failed Login Attempts
Categories
– AWS
– DBA Stories
– Linux
– MySQL
– Other
– Postgres
– PowerShell
– Redshift
– SQL Server
– Windows Server
Tags
Always On Availability Groups (AAG) (3) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (71) Database Backups & Recovery (12) Database Mirroring (2) Deleting Data (1) Error Messages (4) Git Commands (5) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) PowerShell Scripts (1) SQL Server Agent (4) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (14) SQL Server Network Connectivity (2) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (5) SQL Server Permissions (1) SQL Server Processes (5) SQL Server Replication (1) SQL Server Scripts (12) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (20)