commands

^

Get-DbaStartupParameter

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

 

Synopsis

Displays values for a detailed list of SQL Server Startup Parameters.

Description

Displays values for a detailed list of SQL Server Startup Parameters including Master Data Path, Master Log path, Error Log, Trace Flags, Parameter String and much more.

This command relies on remote Windows Server (SQL WMI/WinRm) access. You can pass alternative Windows credentials by using the -Credential parameter.

See https://msdn.microsoft.com/en-us/library/ms190737.aspx for more information.

Syntax

Get-DbaStartupParameter
    [-SqlInstance] <DbaInstanceParameter[]>
    [[-Credential] <PSCredential>]
    [-Simple]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaStartupParameter -SqlInstance sql2014

Logs into SQL WMI as the current user then displays the values for numerous startup parameters.

Example: 2
PS C:\> $wincred = Get-Credential ad\sqladmin
PS C:\> Get-DbaStartupParameter -SqlInstance sql2014 -Credential $wincred -Simple

Logs in to WMI using the ad\sqladmin credential and gathers simplified information about the SQL Server Startup Parameters.

Required Parameters

-SqlInstance

The target SQL Server instance or instances.

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-Credential

Allows you to login to servers using alternate Windows credentials. $scred = Get-Credential, then pass $scred object to the -Credential parameter.

Alias SqlCredential
Required False
Pipeline false
Default Value
-Simple

If this switch is enabled, simplified output will be produced including only Server, Master Data Path, Master Log path, ErrorLog, TraceFlags and ParameterString.

Alias
Required False
Pipeline false
Default Value False
-EnableException

If this switch is enabled, exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.

Alias
Required False
Pipeline false
Default Value False

 

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