Category: PowerShell
PowerShell & Windows Admin Blog Archives, by Peter Whyte, an experienced SQL Server Database Administrator.
-
Running PowerShell Scripts as Scheduled Tasks in Windows
When you need to schedule tasks in Windows, Task Scheduler is the tool for the job. Running PowerShell (.ps1) scripts as Scheduled Tasks differs from running standard batch (.bat) scripts. I often find myself needing a refresher on the process, so I decided to document it in this…
-
How to Check Features Installed in SQL Server
This guide explains how to check which features are installed on a SQL Server instance. When downgrading from SQL Server Enterprise to Standard, checking the installed features is crucial to ensure compatibility and avoid losing critical functionality. Some Enterprise features may not be available in the Standard edition,…
-
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.…
-
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…
-
Install/Uninstall SQL Server via Command
Installing and uninstalling SQL Server via command line can be useful, especially in environments without a GUI. In this guide, I’ll walk through installing SQL Server on Windows Server Core, in a local Hyper-V test environment. At the end I’ll also uninstall SQL Server from a PowerShell terminal…
-
Guide for Setting Up Windows Server Core
When you need to setup Windows Server Core, it’s useful to first familiarize ourselves with the key PowerShell commands that configure the server. Windows Server Core is a minimal installation option that provides a lightweight, command-line interface (CLI)-only environment, making it ideal for environments requiring lower resource usage…
-
Updating Help Documentation in PowerShell
Keeping your PowerShell help documentation up to date ensures you always have the latest guidance and reference materials for installed modules. The Update-Help cmdlet allows you to download and install the most recent help files, but you may encounter an access denied error if PowerShell is not run…
-
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…
-
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…
Recent Posts
- How to Open PowerShell as Administrator
- How to Filter Objects in SSMS
- The Evolution of Microsoft SQL Server
- SQL Server Script: Enable or Disable All SQL Agent Jobs
- Database cannot be opened, it is in the middle of a Restore
Categories
– AWS
– DBA Stories
– Linux
– MySQL
– Other
– Postgres
– PowerShell
– Redshift
– SQL Server
– Windows Server
Tags
Always On Availability Groups (AAG) (4) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (76) Database Backups & Recovery (14) Database Mirroring (2) Deleting Data (1) Error Messages (5) 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 (5) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (15) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (5) SQL Server Permissions (2) SQL Server Processes (5) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (19)