Category: PowerShell

PowerShell & Windows Admin Blog Archives, by Peter Whyte, an experienced SQL Server Database Administrator.

  • How to Enable TCP/IP Connections in SQL Server

    Some network protocols, like TCP/IP, are disabled by default in SQL Server. To allow TCP connections, you need to enable them and restart the SQL Server service. Here’s a simple guide to do this via GUI & command: :# Option 1: Enable TCP/IP via SQL Server Configuration Manager.…

    Read More


  • Adding & Removing SQL Features via Command

    This post will guide you on how to add and remove features from SQL Server via the command line. The process includes checking installed features, installing a new feature (such as replication), and uninstalling a feature when no longer needed. The following areas will be covered within this…

    Read More


  • Install/Uninstall SQL Server via Command

    This is a post on installing SQL Server via command; I have a Windows Server 2016 Core running on a local Hyper-V test environment, and I’m installing SQL Server 2019, then uninstalling it. There’s 4 parts to this one;# Download a SQL Server ISO. # Mount the ISO…

    Read More


  • Configuring Windows Server Core

    Windows Server Core is the CLI only version of the Windows OS. This post is a run-through of configuring a new Windows Server 2016 Core host, detailed in the following steps; # Installing Windows Server 2016 Core. # (CLI) Changing a Windows Server Hostname.# (CLI) Amending TCP/IP &…

    Read More


  • Updating Help Documentation in PowerShell

    The Update-Help cmdlet in PowerShell will download the latest help files for PowerShell modules installed on your machine. Running PowerShell as Administrator is a requirement for this one, else you’ll get the following error. “Access is denied” is the key part in this error, amongst a lot of…

    Read More


  • Counting Rows within CSV Files using PowerShell

    This post contains a script that will help count rows within multiple CSV files using PowerShell. If you have a directory containing many CSV files, this’ll help you count the rows of each CSV file within the folder. Counting rows within CSV files may be useful for verifying…

    Read More


  • Show Available Disk Space in SQL Server

    This blog post is to share a script that you can run in SQL Server (versions 2008 R2 and above) which shows the available disk space for all local volumes on a SQL Server host. I’m also including a quick note on how to get this information with…

    Read More