| title | Database Engine PowerShell Reference | Microsoft Docs |
|---|---|
| ms.custom | |
| ms.date | 06/13/2017 |
| ms.prod | sql-server-2014 |
| ms.reviewer | |
| ms.technology | database-engine |
| ms.topic | conceptual |
| ms.assetid | 3c379a43-c497-47dd-8e7d-2b015c068bb7 |
| author | mashamsft |
| ms.author | mathoma |
| manager | craigg |
[!INCLUDEssNoVersion] includes a set of Windows PowerShell 2.0 cmdlets for performing common actions in the [!INCLUDEssDE]. In addition, Query Expressions and Uniform Resource Names (URN) can be converted to SQL Server PowerShell paths, or used to specify one or more objects in the [!INCLUDEssDE].
[!INCLUDEssCurrent] includes relatively few cmdlets for the [!INCLUDEssDE]. Most PowerShell scripts working with the [!INCLUDEssDE] use the SQL Server PowerShell provider and the manageability object models. For more information, see SQL Server PowerShell Provider.
To learn how to get help about the SQL Server cmdlets in a Windows PowerShell environment, see Get Help SQL Server PowerShell.
This section contains information about these cmdlets.
| Description | Cmdlet |
|---|---|
Runs Transact-SQL and XQuery scripts, such as scripts that can be run using the sqlcmd utility. |
Invoke-Sqlcmd cmdlet |
| Evaluates whether a Database Engine object complies with a Policy-based Management policy. | Invoke-PolicyEvaluation cmdlet |
The Encode-Sqlname and Decode-Sqlname cmdlets help you specify SQL Server identifiers that contain characters not supported in PowerShell paths. For more information, see SQL Server Identifiers in PowerShell.
Use the Convert-UrnToPath cmdlet to convert a Unique Resource Name for a [!INCLUDEssDE] object to a path for the SQL Server PowerShell provider. For more information, see Convert URNs to SQL Server Provider Paths.
Query expressions are strings that use syntax similar to XPath to specify a set of criteria that enumerate one or more objects in an object model hierarchy. A Unique Resource Name (URN) is a specific type of query expression string that uniquely identifies a single object. For more information, see Query Expressions and Uniform Resource Names.