Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Register SQL Server instances in MS. Expand / Collapse
Author
Message
Posted Monday, June 21, 2010 10:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 8:38 AM
Points: 131, Visits: 635
Hi All,

Recently moved to a new position where we currently have 250 SQL Servers. To register these in E.M. manually would be very time consuming and I can only think this can be done automatically via Powershell.

I can get the list of SQL Server instances into a table or text file.

I've never used PowerShell scripting before and although it would be useful to learn just don't have the time at the moment !

If I'm correct that PowerShell scripting is the easiest way forward does anyone have a script that can do this. Would be very grateful.

versions are SQL Servers are 2000, 2005 and few of thems are on 2008.


Regards,

A. Singh



Post #940459
Posted Friday, September 3, 2010 8:39 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, September 26, 2014 6:44 AM
Points: 1,819, Visits: 2,200
I have the SQL 2008 client loaded so this is a simple method using SQLPS but it is the basis of what I use:

cd 'SQLSERVER:\sqlregistration\Database Engine Server Group'
new-item ServerGroupA #tcreate a group for servers
cd ServerGroupA # sets location in the group just created
Get-Content C:\ServerList.Txt | foreach {New-Item $_ -itemtype registration -Value "server=$_ ; integrated security=true" }



MG

"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare

"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

Post #980245
Posted Friday, September 3, 2010 9:00 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, September 29, 2014 11:09 PM
Points: 3,108, Visits: 11,502
If there is someone else with all the servers registered in SSMS 2008, you can have them export their server list, and you can import it.

The export file is XML, so you might be able to figure out a way to produce a valid file to import from a list of servers.
Post #980266
Posted Friday, September 3, 2010 9:18 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 5:59 PM
Points: 31,082, Visits: 15,529
This help?
http://sev17.com/2009/01/dynamically-register-sql-instances-in-sql-server-management-studio-2008/







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #980284
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse