You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Run Windows PowerShell from SQL Server Management Studio | Microsoft Docs"
3
3
description: Learn how to start a Windows PowerShell session from Object Explorer in SQL Server Management Studio, with the path preset to the location of your choice of objects.
4
-
ms.custom: ""
5
-
ms.date: "03/14/2017"
6
4
ms.prod: sql
7
-
ms.reviewer: matteot, drskwier
8
5
ms.technology: sql-server-powershell
9
6
ms.topic: conceptual
10
7
ms.assetid: 1f841825-da1f-4062-9a81-3cdbab03845b
11
8
author: markingmyname
12
9
ms.author: maghan
10
+
ms.reviewer: matteot, drskwier
11
+
ms.custom: ""
12
+
ms.date: "03/14/2017"
13
13
---
14
+
14
15
# Run Windows PowerShell from SQL Server Management Studio
16
+
15
17
[!INCLUDE[SQL Server Azure SQL Database Synapse Analytics PDW ](../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
16
18
17
19
You can start Windows PowerShell sessions from **Object Explorer** in [!INCLUDE[ssManStudioFull](../includes/ssmanstudiofull-md.md)]. [!INCLUDE[ssManStudio](../includes/ssmanstudio-md.md)] launches Windows PowerShell, loads the **SqlServer** module, and sets the path context to the associated node in the **Object Explorer** tree.
@@ -22,27 +24,26 @@ You can start Windows PowerShell sessions from **Object Explorer** in [!INCLUDE[
22
24
> Previous versions of the **SqlServer** module *were* included with SQL Server Management Studio (SSMS), but only with the 16.x versions of SSMS. To use PowerShell with SSMS 17.0 and later, the **SqlServer** module must be installed from the PowerShell Gallery.
23
25
> To install the **SqlServer** module, see [Install SQL Server PowerShell](download-sql-server-ps-module.md).
24
26
25
-
26
-
27
27
When you specify running PowerShell for an object in **Object Explorer**, [!INCLUDE[ssManStudioFull](../includes/ssmanstudiofull-md.md)] starts a Windows PowerShell session in which the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] PowerShell snap-ins have been loaded and registered. The path for the session is preset to the location of the object you right-clicked in Object Explorer. For example, if you right-click the [!INCLUDE[ssSampleDBobject](../includes/sssampledbobject-md.md)] database object in Object Explorer and select **Start PowerShell**, the Windows PowerShell path is set to the following:
**To run PowerShell from SQL Server Management Studio**
35
-
36
-
1. Open **Object Explorer**.
37
-
38
-
2. Navigate to the node for the object to be worked on.
39
-
40
-
3. Right-click the object and select **Start PowerShell**.
41
-
42
-
## Permissions
43
-
When opened from [!INCLUDE[ssManStudio](../includes/ssmanstudio-md.md)], PowerShell does not run with Administrator privileges, which may prevent some activities such as calls to WMI.
31
+
```
32
+
33
+
## Run PowerShell
34
+
35
+
**To run PowerShell from SQL Server Management Studio**
36
+
37
+
1. Open **Object Explorer**.
38
+
39
+
2. Navigate to the node for the object to be worked on.
40
+
41
+
3. Right-click the object and select **Start PowerShell**.
42
+
43
+
## Permissions
44
+
45
+
When opened from [!INCLUDE[ssManStudio](../includes/ssmanstudio-md.md)], PowerShell does not run with Administrator privileges, which may prevent some activities such as calls to WMI.
44
46
45
47
## See Also
46
-
[SQL Server PowerShell](sql-server-powershell.md)
47
-
48
-
48
+
49
+
-[SQL Server PowerShell](sql-server-powershell.md)
Copy file name to clipboardExpand all lines: docs/powershell/sql-server-powershell-provider.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
title: "SQL Server PowerShell Provider | Microsoft Docs"
3
3
description: Learn about the SQL Server provider for Windows PowerShell, which provides access to SQL Server objects by means of paths similar to file system paths.
0 commit comments