Stairway to SQL PowerShell Level 8: SQL Server PowerShell Provider

  • Ben Miller

    SSCrazy

    Points: 2964

    Comments posted to this topic are about the item Stairway to SQL PowerShell Level 8: SQL Server PowerShell Provider



    Ben Miller
    Microsoft Certified Master: SQL Server, SQL MVP
    @DBAduck - http://dbaduck.com

  • jbnv

    SSC Eights!

    Points: 973

    Does the Provider work for SQL Azure?

    Jay Bienvenu | http://bienv.com | http://twitter.com/jbnv

  • Ben Miller

    SSCrazy

    Points: 2964

    SQL Azure has it's own PowerShell modules.

    http://azure.microsoft.com/blog/2013/02/07/windows-azure-sql-database-management-with-powershell/



    Ben Miller
    Microsoft Certified Master: SQL Server, SQL MVP
    @DBAduck - http://dbaduck.com

  • timwell

    SSCertifiable

    Points: 5045

    Hello, great stairway!

    I have two instances of SQL server installed, 2008 R2 SP1 and an EXPRESS version I think installed with Visual Studio.

    I am able to navigate to

    SQLSERVER:\sql\localhost\SQLEXPRESS and even to

    SQLSERVER:\sql\GARUDA\SQLEXPRESS (GARUDA is the computer name)

    and see the databases as in your examples but have not been able to navigate to the other instance, or to even find what the instance name is, unless it's MSSQLSERVER (which it does not recognize)

    I do not do anything with SQLEXPRESS, so can you tell me how to find the instance name and connect through PS?

    Thanks,

    Tim W.

  • Ben Miller

    SSCrazy

    Points: 2964

    If you do this:

    cd SQLSERVER:\sql\localhost

    dir

    You should see instances. If you have a default instance then you use the word DEFAULT or default in your path.

    SQLSERVER:\sql\localhost\default



    Ben Miller
    Microsoft Certified Master: SQL Server, SQL MVP
    @DBAduck - http://dbaduck.com

  • timwell

    SSCertifiable

    Points: 5045

    dbaduck (10/19/2015)


    If you have a default instance then you use the word DEFAULT or default in your path.

    SQLSERVER:\sql\localhost\default

    Thanks, Default worked for what I needed.

    dbaduck (10/19/2015)


    If you do this:

    cd SQLSERVER:\sql\localhost

    dir

    You should see instances.

    This lists a lot of stuff, and the InstanceName property for the default is blank. It was more helpful when I filtered it like this:

    dir | Select PSChildName

    Is that the property to look at?

  • Ben Miller

    SSCrazy

    Points: 2964

    I am not sure why you would not see the instances when you use the dir SQLSERVER:\sql\localhost.

    Mine shows DEFAULT as the instance name. If I cd into DEFAULT then I see a lot of options. But PSChildName would certainly show you the instances on the machine.



    Ben Miller
    Microsoft Certified Master: SQL Server, SQL MVP
    @DBAduck - http://dbaduck.com

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply