How can I connect Powershell ISE to SQL?

Posted on 2011-10-27
Last Modified: 2012-05-12
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?
Question by:Mr_Shaw

    Accepted Solution

    I think I have found the answer on:

    I needed to use:

    Add-PSSnapin SqlServerProviderSnapin100
    Add-PSSnapin SqlServerCmdletSnapin100


    set-location SQLSERVER:\SQL\MachineName\DEFAULT\Databases\DatabaseName

    Author Closing Comment

    No answer to my question except for myself.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now