SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Register SQL Server instances in MS.


Register SQL Server instances in MS.

Author
Message
Arshpreet
Arshpreet
Old Hand
Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)Old Hand (328 reputation)

Group: General Forum Members
Points: 328 Visits: 722
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
MG-148046
MG-148046
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3811 Visits: 2832
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.
Michael Valentine Jones
Michael Valentine Jones
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15075 Visits: 11848
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.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)

Group: Administrators
Points: 150684 Visits: 19455
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
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search