commands

^

Get-DbaRegistryRoot

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Get-DbaRegistryRoot on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaRegistryRoot.

Synopsis

Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer

Description

Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer

Syntax

Get-DbaRegistryRoot
    [[-ComputerName] <DbaInstanceParameter[]>]
    [[-Credential] <PSCredential>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaRegistryRoot

Gets the registry root for all instances on localhost

Example: 2
PS C:\> Get-DbaRegistryRoot -ComputerName server1

Gets the registry root for all instances on server1

Optional Parameters

-ComputerName

The target computer. This is not a SQL Server service, though if you pass a named SQL instance, it'll parse properly down to the computer name

Alias
Required False
Pipeline true (ByValue)
Default Value $env:COMPUTERNAME
-Credential

Allows you to login to $ComputerName using alternative Windows credentials

Alias
Required False
Pipeline false
Default Value
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False