PowerShell

Solve your SQL Server PowerShell issues with these valuable tips, tutorials, how-to’s, scripts, and more for SQL Server DBAs.

Title Author Date
Find Text in Stored Procedure, Function, View, or Trigger Jeffrey Yao2025-01-28
How to Query Multiple Azure SQL Databases and Save the Results Jim Evans2023-08-23
How to Run a PowerShell Script with SQL Server Agent or Task Scheduler Alejandro Cobar2023-03-15
PowerShell Script for SQL Server Instance Details, Create Backup, Jobs Alejandro Cobar2022-07-06
PowerShell Pipelines Sample Code to Pass Parameters Alejandro Cobar2022-06-08
CMDLETs for PowerShell Examples and Usage Alejandro Cobar2022-05-24
PowerShell Functions for SQL Server DBAs Alejandro Cobar2022-05-05
PowerShell Loops – FOR, FOREACH, WHILE, DO UNTIL and DO WHILE Alejandro Cobar2022-04-20
PowerShell If, If Else and Switch Examples Alejandro Cobar2022-03-24
PowerShell Variable Examples for Data Types, Scope, Naming, Assignment Alejandro Cobar2022-02-10
Getting Started with PowerShell for the SQL Server DBA Alejandro Cobar2021-10-29
Getting Started with PowerShell Commands for SQL Server Alejandro Cobar2021-09-28
SQL Server Backup Testing and Verification Alejandro Cobar2021-05-25
Deploy Database Objects to Multiple SQL Server Instances Alejandro Cobar2020-11-19
Execute SSIS Package in Cloud with PowerShell Koen Verbeeck2020-11-05
PowerShell Script to Parse HTML Code with SQL Server Build Numbers Alejandro Cobar2020-10-30
SSIS Package Execution from SSIS Catalog with PowerShell Koen Verbeeck2020-10-27
SSIS Package Execution from PowerShell Koen Verbeeck2020-10-09
Create SQL Server Database with PowerShell Joe Gavin2019-11-12
Using PowerShell to Encode Files Tim Smith2019-05-21
Call SQL Server Stored Procedures with PowerShell Parameter Objects Tim Smith2019-04-22
Getting Started with PowerShell File Properties and Methods Tim Smith2019-04-02
Execute SQL Server Stored Procedures from PowerShell Tim Smith2019-03-18
Create File with Content Using PowerShell Tim Smith2019-03-05
Verify File Exists Using PowerShell Tim Smith2019-02-19
PowerShell to Read Directory Contents and Store in SQL Server Table Nisarg Upadhyay2019-01-28
Options For Reporting Errors In Catch Statements Using PowerShell Tim Smith2018-12-27
Develop and Debug PowerShell Scripts with MyInvocation Tim Smith2018-12-18
How to Query Arrays, Hash Tables and Strings with PowerShell Tim Smith2018-08-13
Getting the Count of Non-Null Values in a SQL Server Table with PowerShell Tim Smith2018-07-03
Pre-validating Data in Delimited Files with PowerShell Prior to Importing to SQL Server Tim Smith2018-06-26
Parsing Strings From Delimiters In PowerShell Tim Smith2018-06-21
Using Nested Switch Statements In PowerShell Tim Smith2018-04-24
PowerShell for SSAS Multidimensional Aaron Nelson2018-04-23
How to Modify the Global DNS Configuration on Servers Using PowerShell Daniel Farina2018-04-20
PowerShell and Hash Table Examples Tim Smith2017-11-23
Find Drives with Low Disk Space for all SQL Instances using PowerShell Pablo Echeverria2017-11-07
Bulk Copy Data from Oracle to SQL Server Jeffrey Yao2017-10-26
Debugging PowerShell Scripts Tim Smith2017-10-11
Backup SQL Server Databases in Parallel with PowerShell Pablo Echeverria2017-09-27
Processing text files with PowerShell John Miner2017-09-15
Using PowerShell to Check or Compare Values Tim Smith2017-09-05
Using PowerShell to Work with Directories and Files John Miner2017-09-01
PowerShell Scripts for Obtaining File Metadata Tim Smith2017-08-30
New Features and Best Practices of SQL Server PowerShell Aaron Nelson2017-08-01
PowerShell and Object-Level Math Functions Tim Smith2017-03-28
Add, Remove, and Get SQL Logins, New SQL PowerShell 2016 cmdlets Aaron Nelson2017-02-13
PowerShell Invoke-SQLCmd outputs DataTables you can INSERT into SQL Server Aaron Nelson2017-01-26
New PowerShell cmdlets to read and write SQL Server tables Rajendra Gupta2017-01-06
Find current running SQL Server queries with a PowerShell script Eli Leiba2016-12-27
SQL Server 2016 PowerShell cmdlets for SQL Agent Rajendra Gupta2016-12-22
Generate T-SQL Scripts for all SQL Server Databases and all Objects using PowerShell Angel Gomez2016-12-15
PowerShell changes and new cmdlets for SQL Server 2016 Rajendra Gupta2016-11-17
Use PowerShell to Determine the number DML operations in SQL Server Scripts Tim Smith2016-09-15
Update SQL Server Agent Job owner and Database owner with PowerShell Tim Smith2016-06-20
PowerShell Parameters Part II – ValidateSet and ValidatePattern Tim Smith2016-04-19
PowerShell Script to Delete All Data in a SQL Server Database Jeffrey Yao2016-04-18
Validating PowerShell Parameters – Part I Tim Smith2016-04-01
Limit Time Ranges In PowerShell for Calculations Tim Smith2016-03-15
4 Convenient Ways To Run PowerShell Scripts Tim Smith2016-03-03
SQL Server Agent Error Logging for Powershell Job Steps Diana Moldovan2016-02-29
Using PowerShell to export Active Directory information Douglas Correa2016-02-22
Using PowerShell To Record SQL Server Virtual Log File (VLF) Growth Tim Smith2016-01-27
Detect and rename invalid VIEWs in a SQL Server database using PowerShell Johan Bijnens2015-09-24
PowerShell and ADO.NET Connection String Settings for SQL Server Tim Smith2015-08-28
Improve PowerShell SMO Performance for SQL Server Diana Moldovan2015-06-26
Reading Text Files With PowerShell For Configurations Part I Tim Smith2015-06-10
Modifying SQL Server Agent Settings Using PowerShell Johan Bijnens2015-04-22
Consider New Ideas for SQL Server Data Analysis Tim Smith2015-04-02
Using PowerShell With Configuration Tables in SQL Server Tim Smith2015-03-10
Complete Common SQL Server Database Administration Tasks In Parallel with PowerShell V3 WorkFlow Jeffrey Yao2015-03-06
Executing scripts on multiple servers by SQL Server version and edition using PowerShell Tim Smith2015-03-04
Drive inventory for clustered SQL Server instances using PowerShell Johan Bijnens2015-02-19
PowerShell to automate multiple database SQL Server restores to refresh environments Jeffrey Yao2015-02-18
Error handling with try-catch-finally in PowerShell for SQL Server Diana Moldovan2015-02-16
Determine Minimum Possible Size to Shrink SQL Transaction Log File Edwin Sarmiento2015-02-04
Get Total Line Counts for all SQL Server Source Objects Using PowerShell Jeffrey Yao2015-01-23
Drop and Re-Create All Foreign Key Constraints in a SQL Server database using PowerShell Johan Bijnens2015-01-02
Video of 6 Useful PowerShell Scripts to Help SQL Server DBAs and Developers Tim Smith2014-12-12
6 Useful PowerShell Scripts to Help SQL Server DBAs and Developers Tim Smith2014-12-01
One Line PowerShell Solutions To Common SQL Server DBA Tasks Jeffrey Yao2014-11-20
Video on Text Mining SQL Server Data Using PowerShell Tim Smith2014-10-20
PowerShell Regular Expression (RegEx) Video Examples for SQL Server Tim Smith2014-09-29
PowerShell and T-SQL Regular Expression Examples for SQL Server Tim Smith2014-09-24
SQL Server Video to Extract All Excel Worksheets into individual CSV files Tim Smith2014-08-06
SQL Server Video Validate File Properties Prior to Importing Data Tim Smith2014-07-07
SQL Server Video Automating Flat File Imports using PowerShell Tim Smith2014-06-18
SQL Server Video to Rename and Move a File using PowerShell Tim Smith2014-06-12
Extract and convert all Excel worksheets to CSV files with PowerShell Tim Smith2014-05-12
Rename and Move a File with PowerShell in a SQL Server Agent Job Tim Smith2014-04-21
Monitor a SQL Server Cluster using PowerShell Ben Snaidero2014-01-27
SQL Server Database Connectivity Testing Using PowerShell John Grover2014-01-24
Check SQL Server Database Consistency and Backups Without Impacting Performance Richard Vantrease2014-01-21
Monitor SQL Server Disk Space Using PowerShell Richard Vantrease2014-01-13
Handling Windows Processes using Windows PowerShell for SQL Server Manvendra Singh2013-07-01
Controlling Windows and SQL Server Services using Windows PowerShell Manvendra Singh2013-05-29
Using PowerShell for SSAS tasks – Part 1 Daniel Calbimonte2013-05-06
Using PowerShell to access event logs for SQL Server Manvendra Singh2013-04-30
Disable or Enable SQL Server Agent Jobs using PowerShell Edwin Sarmiento2012-10-17
Check SQL Server Virtual Log Files Using PowerShell Edwin Sarmiento2012-10-09
PowerShell script to find files that are consuming the most disk space Jugal Shah2012-09-24
Parsing all the files in a directory using PowerShell K. Brian Kelley2012-08-22
Using a PowerShell Script to delete old files for SQL Server Jugal Shah2012-06-26
Introduction into handling errors in PowerShell for SQL Server tasks Diana Moldovan2012-06-25
Setting the PowerShell Execution Policy Jugal Shah2012-05-22
Iterating through SQL Servers and database objects with PowerShell Diana Moldovan2012-04-05
Enable PowerShell on Windows Server 2008 R2 Core Edition Manvendra Singh2011-12-19
PowerShell changes for database backups in SQL Server 2012 Shawn Melton2011-12-16
Enable Powershell Remoting on SQL Server Instances Manvendra Singh2011-12-01
Using PowerShell for SQL Server Transaction Log Backups Shawn Melton2011-09-27
Using PowerShell for SQL Server Database Backups Shawn Melton2011-09-16
Introducing PowerShell V2 Remoting for SQL Server Diana Moldovan2011-09-06
Removing HTML tags from text data using PowerShell Diana Moldovan2011-08-24
Using PowerShell to Pull SQL Server Services Configuration Information Shawn Melton2011-04-14
Scheduling a SQL Server PowerShell script using the Task Scheduler Diana Moldovan2011-01-28
Find SQL Server Instances Across Your Network Using Windows PowerShell Edwin Sarmiento2010-05-20
Retrieve Default SQL Server Backup Folder using PowerShell Edwin Sarmiento2010-04-15
Connect to SQL Server with PowerShell and SQL Server Authentication Edwin Sarmiento2010-02-22
Backup SQL Server Databases with a Windows PowerShell Script Edwin Sarmiento2009-10-20
Generating SQL Scripts using Windows PowerShell Edwin Sarmiento2009-09-22
Invoke Nz Powershell script similar to Nz VBA function Chad Boyd2009-07-26
Checking SQL Server Agent jobs using Windows PowerShell Edwin Sarmiento2009-07-21
Check the Last SQL Server Backup Date using Windows PowerShell Edwin Sarmiento2009-07-01
Retrieve List of SQL Server Databases and Properties with PowerShell Edwin Sarmiento2009-05-26
Using PowerShell with SQL Server Management Objects (SMO) Edwin Sarmiento2009-05-06
Introduction to Windows PowerShell for the SQL Server DBA Part 2 Edwin Sarmiento2009-03-09
PowerShell Support in SQL Server 2008 with the Invoke Sqlcmd Cmdlet Ray Barley2009-02-10
Introduction to Windows PowerShell for the SQL Server DBA Part 1 Edwin Sarmiento2009-02-04
Restore-SqlDb to restore a SQL Database improved with Powershell Chad Boyd2008-10-12