Book Image

PowerShell for SQL Server Essentials

By : Donabel Santos
Book Image

PowerShell for SQL Server Essentials

By: Donabel Santos

Overview of this book

Table of Contents (15 chapters)
PowerShell for SQL Server Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Implementing Reusability with Functions and Modules
Index

SQL Server-specific cmdlets


To get the cmdlets and functions that come with SQL Server-related modules, you can use the following command:

Get-Command –Module *SQL*

The following table lists the cmdlets included in the SQLPS module in a typical SQL Server 2014 installation. You can use this as a reference when you are looking up SQL Server cmdlets. You will notice that there are two SQL Server modules: SQLPS and SQLASCMDLETS. SQLPS contains mostly database engine cmdlets, while the SQLASCMDLETS module contains cmdlets related to SQL Server Analysis Services.

Module name

Command type

Name

SQLPS

Function

SQLSERVER:

SQLASCMDLETS

Cmdlet

Add-RoleMember

SQLPS

Cmdlet

Add-SqlAvailabilityDatabase

SQLPS

Cmdlet

Add-SqlAvailabilityGroupListenerStaticIp

SQLPS

Cmdlet

Add-SqlFirewallRule

SQLASCMDLETS

Cmdlet

Backup-ASDatabase

SQLPS

Cmdlet

Backup-SqlDatabase

SQLPS

Cmdlet

Convert-UrnToPath

SQLPS

Cmdlet

Decode-SqlName

SQLPS

Cmdlet

Disable-SqlAlwaysOn

SQLPS

Cmdlet

Enable-SqlAlwaysOn...