Category: PowerShell
PowerShell & Windows Admin Blog Archives, by Peter Whyte, an experienced SQL Server Database Administrator.
-
How to Install Windows Terminal
Windows Terminal (WT) is a modern command-line application for Windows that supports various shells such as PowerShell, Command Prompt, and Windows Subsystem for Linux (WSL). It offers a rich user experience with features like tabs, panes, and a customizable interface. Other benefits of Windows Terminal include Unicode /…
-
How to Install Posh-Git on Windows
posh-git is a PowerShell module that enhances your command line experience by displaying Git status information and providing tab completion for Git commands. This guide will show you how to install Posh Git on Windows using the Chocolatey Package Manager. As an afterthought, I’ve added notes at the…
-
Install Chocolatey on Windows
This post is a guide on installing the Chocolatey package manager on Windows by running a PowerShell command. Chocolatey allows you to manage software packages on your system with simple ‘choco’ commands. In this post after I install Chocolatey I’m installing a GUI to view all installed packages.…
-
Enable Windows Subsystem for Linux (with Ubuntu 18.04)
WSL allows Windows users to develop and run applications within a GNU/Linux environment. Previous to this feature release we needed VM’s or a dual boot setup. For more information, as always have a look at the Microsoft Docs. There’s a huge amount of tutorials and documentation on this…
-
Removing Quotes from a CSV File with PowerShell
This post explains how to remove quotes from a CSV file using PowerShell, a common requirement when working with CSVs that include unnecessary or problematic quotes. Whether you’re cleaning up data for easier processing or addressing formatting issues caused by quotes, this post will show you how to…
-
“.ps1 cannot be loaded because running scripts is disabled on this system” PowerShell Error
When attempting to run a PowerShell script you may receive the following error: cdk.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170 This post is here to help you resolve this issue. The reason this is happening is…
-
Testing Connectivity to Remote Server Ports with PowerShell
All admins need a tool to test connectivity to remote servers on TCP ports. In Windows, this is commonly done using PuTTy or PowerShell. This post is a note on my favourite way of testing remote TCP connections in Windows, which is using PowerShell:> Check a Port is…
-
Forcing Encryption in SQL Server
If you’re ever planning to allow external connections to a SQL Server, one of the first things to ensure is that the data is encrypted at rest and in transit. SQL Server has an option where we can force all connections on a SQL Server to be encrypted,…
-
Running PowerShell Scripts as Scheduled Tasks in Windows
When you need something scheduled in Windows, the Task Scheduler is the tool at-hand. Running PowerShell (.ps1) scripts as Scheduled Tasks is done differently than differently than running regular .bat scripts. Sometimes I forget how it’s done, so a worthy enough post. Below I’m creating a daily reboot…
-
How to Check What Features are Installed in SQL Server
This is a quick guide on how to check which features are installed on a SQL Server. Open your SQL Server installation files. You may find them within the Setup Bootstrap folder (“C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\SQL2019”) or you might already have the ISO handy. We can open…
Recent Posts
- Identify Missing & Unused Indexes in SQL Server
- SQL Server Performance Tuning: Index Fragmentation Scripts
- Show User Activity and Blocking in SQL Server
- Download and Install SQL Server Management Studio (SSMS)
- How to Check and Manage SQL Server Services
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)