Author: Peter Whyte
-
Get Estimated Database Backup/Restore Example
When you’re waiting on a database backup or restore to complete in SQL Server, we can run the script below to get an estimated time of how long the backup has left to go – We have one 5GB database here currently being backed up at the time…
-
How to Get Last Backup Times for all Databases in SQL Server
This is a post on how to get the last backup dates and times for all databases on a SQL Server Instance. Database backups are as important as the availability of your server. If your database gets corrupted, or there’s an accidental data deletion and you need to…
-
How to Check Windows Firewall Status with PowerShell
This post will help you to check your local Windows Firewall status using PowerShell, whether it’s off or on for each Profile. PowerShell commands follow standards and use verb-noun pairs for cmdlets. The verb at the start of the command describes the action the cmdlet performs, and the…
-
How to Enable Windows Firewall with PowerShell
This post is contains a demo on how to enable Windows Firewall with PowerShell in Windows Server. This might be needed if you have discovered Windows Firewall is disabled on your or multiple computers, or you might want to re-enable it after disabling this for a test (see…
-
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…
-
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…
Recent Posts
- Quick Performance Troubleshooting Script for SQL Server
- Checking SQL Server Mirroring Health & Latency
- SQL Server Replication Monitoring Scripts
- Get Last Node Blip in SQL Server FCI
- SQL Script to Get AAG Latency
Categories
– AWS
– DBA Stories
– Linux
– MySQL
– Other
– Postgres
– PowerShell
– Redshift
– SQL Server
– Windows Server
Tags
Always On Availability Groups (AAG) Certificates & Encryption Change Data Capture (CDC) Database Admin Database Backups & Recovery Database Mirroring Deleting Data Error Messages Git Commands Importing & Exporting Data Linked Servers Linux Admin Logging & Monitoring Measuring Databases Microsoft Patching PowerShell Scripts SQL Server Agent SQL Server Database Files SQL Server Data Types SQL Server Management Studio (SSMS) SQL Server Network Connectivity SQL Server on Linux SQL Server Patching SQL Server Performance SQL Server Permissions SQL Server Processes SQL Server Replication SQL Server Scripts Windows Admin Windows Authentication Windows Automation Windows Events Windows Firewall Windows Subsystem for Linux (WSL)