• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 712
  • Last Modified:

How can I connect Powershell ISE to SQL?

I usually launch Powershell by right clicking on the database in SQL Server Management Studio.
 
I would like to run SQL Powershell in Powershell ISE. I have tried using SQLSERVER:\SQL.
 
This does not work.
 
How can I connect Powershell ISE to SQL?
 
0
Mr_Shaw
Asked:
Mr_Shaw
  • 2
1 Solution
 
Mr_ShawAuthor Commented:
I think I have found the answer on: http://powershellcommunity.org/Forums/tabid/54/aft/6204/Default.aspx

I needed to use:

Add-PSSnapin SqlServerProviderSnapin100
Add-PSSnapin SqlServerCmdletSnapin100

#AND THEN USE

set-location SQLSERVER:\SQL\MachineName\DEFAULT\Databases\DatabaseName
0
 
Mr_ShawAuthor Commented:
No answer to my question except for myself.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now