How can I get the SQL Server instance names running based on a hostname (COMPUTERNAME)?
0
votes
1
answer
529
views
I have only a hostname (what Microsoft calls a COMPUTERNAME). How can I get the names of SQL Server instances running on the host?
It appears from other answers that I could look through the services running on the host. However, it is a remote machine and I am not an Administrator for the host or any of the database instances. The organization has not begun to use PowerShell remoting.
Is there a better way? How can this be done?
Windows PowerShell
PS C:\> Get-Service -ComputerName Tyyyyyyy8B
Get-Service : Cannot open Service Control Manager on computer 'Tyyyyyyyy8B'. This operation might require other
privileges.
At line:1 char:1
+ Get-Service -ComputerName Tyyyyyyy8B
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Service], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.GetServiceCommand
PS C:\> $PSVersionTable.PSVersion.ToString()
5.1.19041.2364
PowerShell Core
PS C:\> Get-Service -ComputerName Tyyyyyyy8B
Get-Service: A parameter cannot be found that matches parameter name 'ComputerName'.
PS C:\> $PSVersionTable.PSVersion.ToString()
7.3.5
---
> ...why not ask an admin or DBA for help?
I am a mere, lowly user. There is significant organizational resistance to making work requests of another group.
---
What is the minimum set of permissions I would need to ask for in order to discover SQL Server instances?
Asked by lit
(223 rep)
Jul 7, 2023, 10:13 PM
Last activity: Dec 10, 2024, 09:41 AM
Last activity: Dec 10, 2024, 09:41 AM