Here is a small script using SQLDMO against a MS SQL Server 2000 or 2005 to obtain the TCP port number currently used. I know the Books Online for SS05 indicates that DMO is no longer supported - well I guess that they're wrong:
$s = New-Object -comobject "SQLDMO.SQLServer"
$s.loginsecure = $true
$s.connect("SERVERNAME01")
$s.registry.tcpport
$s.close()
Subscribe to:
Post Comments (Atom)
1 comment:
AFAIK SQLDMO is supported in SQL2005 but is slated to be removed in future versions of SQL Server.
Post a Comment