Create Inventory of SQL Server in Network as Html

This PoSh script tries to enumerate SQL Server instances in your network using SMO and creates an inventory as a Html document.It's similar to MS MAP,but only as a simple plain script and dedicated for SQL Server instances.With this info you could plan a SQL Server consolidation.

 
 
 
 
 
4.8 Star
(18)
13,942 times
Add to favorites
Databases
11/27/2011
E-mail Twitter del.icio.us Digg Facebook
  • Excellent Script!
    1 Posts | Last post March 30, 2019
    • One question can this be tweaked to include 2014,2016 and later versions?
  • No server found error
    1 Posts | Last post March 24, 2014
    • Hi ,
      
        We are getting the SQL Servers discovered in our Azure environment .
      
      
      
      
      2014-03-24T09:48:36: 0 server found.
      2014-03-24T09:48:36: Started creating Html document.
      2014-03-24T09:48:36: Finished
  • Hello
    1 Posts | Last post February 13, 2014
  • VLAN
    3 Posts | Last post November 03, 2013
    • Hello,
      your Programs are great!
      Thank you for your work.
      By this program it where very helpful to have more then one VLan.
      Is there a Chance?
      
      Thank you 
      
    • Hello darkdev2,
      That's the intention of VLAN's, to encapsulate machines in an area and to hide to other to other VLAN's.
      So no, this is a system restriction and there is not work-around for it.
    • Great work. Thanks for sharing
  • Cannot run the script, get error message
    2 Posts | Last post November 04, 2012
    • I am getting the following when I try to run the script:
      
      Unable to find type [Microsoft.SqlServer.Management.Smo.SmoApplication]: make sure that the assembly containing this type is loaded.
      At C:\scripts\EnumSqlServer.ps1:308 char:78
      + [Data.DataTable] $table = [Microsoft.SqlServer.Management.Smo.SmoApplication] <<<< ::EnumAvailableSqlServers($false);
          + CategoryInfo          : InvalidOperation: (Microsoft.SqlSe....SmoApplication:String) [], RuntimeException
          + FullyQualifiedErrorId : TypeNotFound
      
      You cannot call a method on a null-valued expression.
      At C:\scripts\EnumSqlServer.ps1:309 char:87
      + Write-Host ((Get-Date -format yyyy-MM-ddTHH:mm:ss) + ": " + $table.Rows.Count.ToString <<<< () + " server found.");
          + CategoryInfo          : InvalidOperation: (ToString:String) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
      .
      .
      .
      
      I have downloaded the SSMS toolkit and installed it but I am still not able to run the script.
    • Hello Mohammed,
      
      You have to install SMO to get it work, you can get it from SQL Server Feature Pack, e.g. for SQL Serer 2012: http://www.microsoft.com/en-us/download/details.aspx?id=29065
      => Microsoft® SQL Server® 2012 Shared Management Objects 
  • Export to Excel
    2 Posts | Last post July 15, 2012
    • I was looking to edit this script a little bit to have it export to a .csv but was having a little difficulty. Has anyone tried this, and can over some help?
    • Hello computerpaul,
      
      Have you tried to use the Export-Csv cmdlet?
      See http://technet.microsoft.com/library/ee176825.aspx