SQL Cmdlets

A number of cmdlets available in SQL Server PowerShell are part of the basic PowerShell functionality. However, within SQL Server PowerShell, five additional cmdlets are available only after the minishell is started (or if the snap-in is loaded manually, which is not covered in any detail here):

Invoke-PolicyEvaluationA cmdlet that evaluates a SQL Server Policy-Based Management policy (or policies) against a target server.

Invoke-SqlCmdA cmdlet that runs any regular T-SQL command and any languages and commands supported by the sqlcmd utility, which may be more familiar to most users.

Encode-SqlNameA cmdlet that helps to encode SQL Server identifiers into a format that PowerShell can use.

Decode-SqlNameA cmdlet that helps ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.