Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 3.13 KB

File metadata and controls

45 lines (35 loc) · 3.13 KB
title Database Engine PowerShell Reference | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic article
ms.assetid 3c379a43-c497-47dd-8e7d-2b015c068bb7
caps.latest.revision 8
author JennieHubbard
ms.author jhubbard
manager jhubbard

Database Engine PowerShell Reference

[!INCLUDEssNoVersion] includes a set of Windows PowerShell 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].

Database Engine Cmdlets

[!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.

In This Section

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

Information About Other Cmdlets

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 and Unique Resource Names

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.

See Also

SQL Server PowerShell