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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More


  • 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…

    Read More