dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


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.




To log into SQL WMI as the current user then gather and display the values for numerous startup parameters.

Get-DbaStartupParameter -SqlServer sql2014

To log into WMI using the ad\sqladmin credential then gathers and display simplified information about the SQL Server Startup Parameters.

$wincred = Get-Credential ad\sqladmin
Get-DbaStartupParameter -SqlServer sql2014 -Credential $wincred -Simple


Database Engine Service Startup Options
Modifying SQL Server Startup Parameters
Set-SqlStartupParameters #Powershell Function


From PowerShell, execute Get-Help Get-DbaStartupParameter -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaStartupParameter.ps1 on GitHub

Related commands