SQL Server PowerShell Tips
Administration
- Complete Common SQL Server Database Administration Tasks In Parallel with PowerShell V3 WorkFlow
- One Line PowerShell Solutions To Common SQL Server DBA Tasks
Analysis Services
- PowerShell for SQL Server Analysis Services Multidimensional
- Using PowerShell for SQL Server Analysis Services tasks - Part 1
Auditing
Backups
- Backup SQL Server Databases in Parallel with PowerShell
- Backup SQL Server Databases with a Windows PowerShell Script
- Check the Last SQL Server Backup Date using Windows PowerShell
- PowerShell changes for database backups in SQL Server 2012
- Retrieve Default SQL Server Backup Folder using PowerShell
- Using PowerShell for SQL Server Database Backups
- Using PowerShell for SQL Server Transaction Log Backups
Calculations
Comparison
Configuration
- Enable PowerShell on Windows Server 2008 R2 Core Edition
- Enable Powershell Remoting on SQL Server Instances
- How to Modify the Global DNS Configuration on Servers Using PowerShell
- Reading Text Files With PowerShell For Configurations Part I
- Setting the PowerShell Execution Policy
Connections
Connectivity
Data
- Consider New Ideas for SQL Server Data Analysis
- Getting the Count of Non-Null Values in a SQL Server Table with PowerShell
- PowerShell Invoke-SQLCmd outputs DataTables you can INSERT into SQL Server
- Pre-validating Data in Delimited Files with PowerShell Prior to Importing to SQL Server
Data Mining
Database
Database Configurations
- Generating SQL Scripts using Windows PowerShell
- Retrieve a List of SQL Server Databases and their Properties using PowerShell
Date Range
DBCC CHECKDB
Delete
Deployment
- Deploy Database Objects to Multiple SQL Server Instances Using PowerShell
- Use PowerShell to Determine the number DML operations in SQL Server Scripts
Development
- Develop and Debug PowerShell Scripts with MyInvocation
- Iterating through SQL Servers and database objects with PowerShell
- Using Nested Switch Statements In PowerShell
Dynamic
Error Handling
- Error handling with try-catch-finally in PowerShell for SQL Server
- Introduction into handling errors in PowerShell for SQL Server tasks
- Options For Reporting Errors In Catch Statements Using PowerShell
- Try Catch Finally with PowerShell
- Using PowerShell to access event logs for SQL Server
Export
Features
File System
- 6 Useful PowerShell Scripts to Help SQL Server DBAs and Developers
- Getting Started with PowerShell File Properties and Methods
- Parsing all the files in a directory using PowerShell
- PowerShell Module to Read Directory Contents and Store in a SQL Server Table
- PowerShell script to find files that are consuming the most disk space
- PowerShell Scripts for Obtaining File Metadata
- Rename and Move a File with PowerShell in a SQL Server Agent Job
- SQL Server Video to Rename and Move a File using PowerShell
- Using a PowerShell Script to delete old files for SQL Server
- Using PowerShell to Encode Files
- Using PowerShell to Work with Directories and Files
- Video of 6 Useful PowerShell Scripts to Help SQL Server DBAs and Developers
Foreign Keys
Free Space
- Find Drives with Low Disk Space for all SQL Server Instances using PowerShell
- Monitor SQL Server Disk Space Using PowerShell
Functions
Import and Export
- Extract and convert all Excel worksheets into CSV files using PowerShell
- Extracting API Data Using PowerShell and Loading into SQL Server
- SQL Server Video Automating Flat File Imports using PowerShell
- SQL Server Video to Extract All Excel Worksheets into individual CSV files
- SQL Server Video Validate File Properties Prior to Importing Data
Integration Services
- Execute SSIS Package from Catalog with PowerShell - Part 2
- Execute SSIS Package from PowerShell - Part 1
- Execute SSIS Package in Cloud and Package Deployment Model with PowerShell - Part 3
Logins
Monitoring
- Find current running SQL Server queries with a PowerShell script
- Monitor a SQL Server Cluster using PowerShell
Oracle
Overview
- Introducing PowerShell V2 Remoting for SQL Server
- Introduction to Windows PowerShell for the SQL Server DBA Part 1
- Introduction to Windows PowerShell for the SQL Server DBA Part 2
- PowerShell changes and new cmdlets for SQL Server 2016
- PowerShell Support in SQL Server 2008 with the Invoke Sqlcmd Cmdlet
- Using PowerShell with SQL Server Management Objects (SMO)
Performance
Permissions
Processes
Restore
- PowerShell to automate multiple database SQL Server restores to refresh environments
- Restore-SqlDb Automate a SQL Server Database Restore improved with Powershell
Scheduling
- 4 Convenient Ways To Run PowerShell Scripts
- Scheduling a SQL Server PowerShell script using the Task Scheduler
Scripts
- Executing scripts on multiple servers by SQL Server version and edition using PowerShell
- Generate T-SQL Scripts for all SQL Server Databases and all Objects using PowerShell
- How to Query Arrays, Hash Tables and Strings with PowerShell
- PowerShell and Hash Table Examples
- PowerShell Script to Parse HTML Code with SQL Server Build Numbers
- Using PowerShell to export Active Directory information
Security
Servers
- Find SQL Server Instances Across Your Network Using Windows PowerShell
- Using PowerShell to Pull SQL Server Services Configuration Information
Services
SQL Server Agent
- Checking SQL Server Agent jobs using Windows PowerShell
- Disable or Enable SQL Server Agent Jobs using PowerShell
- Modifying SQL Server Agent Settings Using PowerShell
- SQL Server 2016 PowerShell cmdlets for SQL Agent
- SQL Server Agent Error Logging for Powershell Job Steps
Storage
Stored Procedures
- Call SQL Server Stored Procedures with PowerShell using Parameter Objects
- Execute SQL Server Stored Procedures from PowerShell
Strings
- How to find a specific text string in a SQL Server Stored Procedure, Function, View or Trigger
- Parsing Strings From Delimiters In PowerShell
- PowerShell and T-SQL Regular Expression Examples for SQL Server
- PowerShell Regular Expression (RegEx) Video Examples for SQL Server
- Removing HTML tags from text data using PowerShell
Tables
Text Files
Transaction Logs
- Check SQL Server Virtual Log Files Using PowerShell
- Determine Minimum Possible Size to Shrink the SQL Server Transaction Log File
- Using PowerShell To Record SQL Server Virtual Log File (VLF) Growth
Troubleshooting
Variables
- PowerShell Parameters Part II - ValidateSet and ValidatePattern
- Validating PowerShell Parameters - Part I
View