Category: PowerShell
PowerShell blog sharing useful tips and tricks to boost efficiency, published by Peter Whyte, an experienced Microsoft SQL Server Database Administrator.
-
Sudo for Windows: A Quick Overview
With the release of Windows 11 version 24H2 in September 2024, Microsoft introduced Sudo for Windows, adding Linux-like functionality for managing system privileges. Having Sudo on Windows allows us to execute commands with administrative rights directly from a non-elevated console session, making it easier to run administrative tasks…
-
PowerShell Tail: A Familiar Approach to Log File Monitoring
In the Linux world, the tail command is a go-to tool for monitoring logs in real-time. While Windows doesn’t have a direct equivalent, PowerShell’s Get-Content -Tail command provides similar functionality for log monitoring. To help bridge the gap for Linux users and improve log tracking in Windows, this…
-
How to Open PowerShell as Administrator
This post covers most various ways for how to open PowerShell as Administrator on Windows, ensuring you have the necessary permissions for advanced operations. Running PowerShell commands with elevated privileges is often necessary when configuring system settings, installing software, or troubleshooting issues. I think most tasks in my…
-
PowerShell Script: List Files with Sizes and Dates
In this blog post, we’ll go through the steps for using a PowerShell script that lists files in a directory along with their sizes and creation dates. This script is useful for disk space and for checking old files in a folder. List Files with Size and Last…
-
Removing Quotes from all CSV Files in a Directory
Managing CSV files often involves cleaning up data before processing. A common task is removing unwanted quotation marks from the contents of CSV files. I wrote a blog post on how to remove quotes from a single CSV file using PowerShell some years ago, which I have just…
-
How to Set Environment Variables in PowerShell
Environment variables store key information on your system that programs can use to influence their behavior. For example, the AWS CLI uses the AWS_REGION variable to determine the region for API requests. This guide will cover:– Listing all environment variables– Retrieving the value of a specific environment variable–…
-
How to Install PowerShell on Ubuntu 20.04
This guide will walk you through installing PowerShell on Ubuntu 20.04. I’m doing this on Windows Subsystem for Linux (WSL), and have not encountered any compatibility issues with the PowerShell & Ubuntu combo. For the latest updates on PowerShell installation, version compatibility, and support dates, refer to MS…
-
How to Silently Install SSMS
This is a note on how to silently install SQL Server Management Studio (SSMS) via command (PowerShell). SSMS is a tool most people use when working with SQL Server. If you need to install SSMS on multiple computers, you may want to use the silent installation feature for…
-
How to Delete Files in PowerShell
This is a post on how to delete files in PowerShell, which will be useful when you need to delete files as part of a script in Windows. This post covers the following:> PowerShell: Delete a File> PowerShell: Delete a Folder> PowerShell: Delete Files in Subfolders Recursively PowerShell:…
Categories
- Linux & WSL (26)
- Microsoft SQL Server (103)
- Other (13)
- PowerShell (50)
- Windows Server Admin (44)
Tags
Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Error Messages (5) Failover Cluster Instances (FCI) (1) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Administration (2) Logging & Monitoring (1) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (2) SQL Certificates & Encryption (3) SQL Server Agent (5) SQL Server CDC (2) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (17) SQL Server Networking (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance Tuning (6) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) SQL Server Security (4) SQL Server Storage (10) Windows Admin (20) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)