=============== LIBRARY RULES =============== From library maintainers: - Use -EnableException when you need try/catch; dbatools is 'nice by default' and otherwise suppresses hard throws. - Prefer -SqlInstance (DbaInstanceParameter). For non-default ports, quote 'server:port' or 'server,port'. - Dry-run destructive commands with -WhatIf and require confirmation with -Confirm where available. - On Linux/macOS, use PowerShell Core 7.4+; Windows works with Windows PowerShell v3+. - For whole-instance moves use Start-DbaMigration; for granular tasks use Copy-Dba* commands. - Use Invoke-DbaQuery with -SqlParameter to avoid SQL injection in dynamic queries. ### Example 4: Get installation date and format it Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstanceInstallDate.html This example retrieves the installation date for all instances and formats the date to 'yyyy-MM-dd'. ```powershell Get-DbaInstanceInstallDate | Select-Object InstanceName, @{Name='InstallDate';Expression={Get-Date $_.InstallDate -Format 'yyyy-MM-dd'}} -AutoSize ``` -------------------------------- ### Example 5: Get startup parameters for all instances on a server Source: https://github.com/dataplat/docs/blob/master/Get-DbaStartupParameter.html This example retrieves the startup parameters for all SQL Server instances installed on the local machine. ```powershell Get-DbaStartupParameter -SqlInstance $ ``` -------------------------------- ### Example 1: Get installation date for local instances Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstanceInstallDate.html This example retrieves the installation date for all SQL Server instances installed on the local machine. ```powershell Get-DbaInstanceInstallDate | Format-Table InstanceName, InstallDate -AutoSize ``` -------------------------------- ### Example 2: Start all endpoints Source: https://github.com/dataplat/docs/blob/master/Start-DbaEndpoint.html This example demonstrates how to start all available endpoints on the system. ```powershell Start-DbaEndpoint -All ``` -------------------------------- ### Example 2: Get installation date for remote instances Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstanceInstallDate.html This example retrieves the installation date for SQL Server instances on a list of remote servers. ```powershell $servers = "Server01", "Server02" Get-DbaInstanceInstallDate -ComputerName $servers | Format-Table InstanceName, InstallDate -AutoSize ``` -------------------------------- ### Example 4: Start endpoints with specific credentials Source: https://github.com/dataplat/docs/blob/master/Start-DbaEndpoint.html This example illustrates starting endpoints using specific credentials. ```powershell $cred = Get-Credential Start-DbaEndpoint -Name "MyEndpoint" -Credential $cred ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Start-DbaService.html Gets the SQL Server related services on computers sql1, sql2 and sql3 and starts them. ```PowerShell PS C:\> 'sql1','sql2','sql3'| Get-DbaService | Start-DbaService ``` -------------------------------- ### Example 1: Start a specific endpoint Source: https://github.com/dataplat/docs/blob/master/Start-DbaEndpoint.html This example shows how to start a specific endpoint named 'MyEndpoint'. ```powershell Start-DbaEndpoint -Name "MyEndpoint" ``` -------------------------------- ### Example 2: Deploying with Options Source: https://github.com/dataplat/docs/blob/master/Install-DbaSqlPackage.html This example shows how to deploy a DACPAC file with additional options, such as dropping the database if it exists and specifying a different target server. ```powershell Invoke-DbaSqlPackage -Path "C:\MyProject\MyProject.dacpac" -ServerInstance "sqlprod.contoso.com" -DatabaseName "MyDatabase" -DropDatabaseOnTarget -CreateNewDatabase ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMultiTool.html Logs into server1\instance1 with Windows authentication and then installs the DBA MultiTool in the DBA database. ```PowerShell Install-DbaMultiTool -SqlInstance server1\instance1 -Database DBA ``` -------------------------------- ### Example: 3 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMultiTool.html Logs into server1\instance1 with SQL authentication and then installs the DBA MultiTool in the main database. ```PowerShell Install-DbaMultiTool -SqlInstance server1\instance1 -Database main -SqlCredential $cred ``` -------------------------------- ### Example 7: Get installed patches and filter by installation date Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves installed patches that were installed on or after a specific date. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -InstallDate "2023-01-01" ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Install-DbaFirstResponderKit.html Logs into server1 with Windows authentication and then installs the FRK in the master database. ```powershell PS C:\> Install-DbaFirstResponderKit -SqlInstance server1 -Database master ``` -------------------------------- ### Example 12: Get installed patches and exclude specific installation dates Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches except for those installed on the specified date. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ExcludeInstallDate "2022-12-31" ``` -------------------------------- ### Example: 3 Source: https://github.com/dataplat/docs/blob/master/Install-DbaFirstResponderKit.html Logs into server1\instance1 with SQL authentication and then installs the FRK in the master database. ```powershell PS C:\> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database master -SqlCredential $cred ``` -------------------------------- ### Example 3: Get disk space for databases with specific names Source: https://github.com/dataplat/docs/blob/master/Get-DbaDbSpace.html This example demonstrates how to get disk space for databases whose names start with 'App'. ```powershell Get-DbaDbSpace -SqlInstance SQLSERVER2019 -Database App* ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMultiTool.html Logs into server1 with Windows authentication and then installs the DBA MultiTool in the main database. ```PowerShell Install-DbaMultiTool -SqlInstance server1 -Database main ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Install-DbaFirstResponderKit.html Logs into server1\instance1 with Windows authentication and then installs the FRK in the DBA database. ```powershell PS C:\> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database DBA ``` -------------------------------- ### Example 3: Get installation date for a specific instance Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstanceInstallDate.html This example retrieves the installation date for a specific SQL Server instance named 'SQLEXPRESS' on the local machine. ```powershell Get-DbaInstanceInstallDate -InstanceName "SQLEXPRESS" | Select-Object -ExpandProperty InstallDate ``` -------------------------------- ### Example 3: Get estimated completion time for jobs matching a pattern Source: https://github.com/dataplat/docs/blob/master/Get-DbaEstimatedCompletionTime.html This example demonstrates how to get the estimated completion time for jobs whose names start with 'Backup'. ```powershell Get-DbaEstimatedCompletionTime -SqlInstance 'localhost' -JobName 'Backup*' ``` -------------------------------- ### Start-DbaMigration Example Source: https://github.com/dataplat/docs/blob/master/Start-DbaMigration.html This example demonstrates how to use the Start-DbaMigration command to migrate a database. ```powershell Start-DbaMigration -SourceServer "SERVER01" -DestinationServer "SERVER02" -Database "AdventureWorks" -MigrationType "Copy" -Force ``` -------------------------------- ### Example 1: Get all network certificates from a server Source: https://github.com/dataplat/docs/blob/master/Get-DbaNetworkCertificate.html This example retrieves all network certificates installed on the server 'SERVER01'. ```powershell Get-DbaNetworkCertificate -ComputerName SERVER01 ``` -------------------------------- ### Example 15: Get installed patches and output as CSV Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches and exports the information to a CSV file. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" | Export-Csv -Path "C:\\Patches.csv" -NoTypeInformation ``` -------------------------------- ### Example 2: With Specific Options Source: https://github.com/dataplat/docs/blob/master/Start-DbaXESmartTarget.html This example shows how to use Start-DbaXESmartTarget with specific options. ```powershell Start-DbaXESmartTarget -Target "ServerName\InstanceName" -Option1 "Value1" -Option2 "Value2" ``` -------------------------------- ### Example 9: Get installed patches and filter by hotfix level Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves installed patches that are Hotfix level 10. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -HotfixLevel 10 ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMaintenanceSolution.html This will create the Ola Hallengren's Solution objects. Existing objects are not affected in any way. ```PowerShell Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -InstallJobs -BackupLocation "Z:\SQLBackup" -CleanupTime 72 ``` -------------------------------- ### Example 6: Get installed patches and filter by patch name Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves installed patches that contain a specific string in their name. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -PatchName "SQL Server 2019 CU10" ``` -------------------------------- ### Example 14: Get installed patches and exclude specific hotfix levels Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches except for those with the specified hotfix levels. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ExcludeHotfixLevel 5 ``` -------------------------------- ### Example 11: Get installed patches and exclude specific patch names Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches except for those with the specified patch names. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ExcludePatchName "SQL Server 2017 CU15" ``` -------------------------------- ### Install SQL Server Instance Source: https://github.com/dataplat/docs/blob/master/Install-DbaInstance.html This example shows how to install a SQL Server instance using dbatools. ```powershell Install-DbaInstance -ComputerName "YourServerName" -InstanceName "YourInstanceName" -SqlVersion "2019" -Credential (Get-Credential) ``` -------------------------------- ### Example 10: Get installed patches and exclude specific KBs Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches except for those with the specified KB article IDs. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ExcludeKBArticleID "KB5000000","KB5000001" ``` -------------------------------- ### Example 8: Get installed patches and filter by service pack level Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves installed patches that are Service Pack level 1. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ServicePackLevel 1 ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Show-DbaDbList.html Shows a GUI list of databases using SQL credentials to connect to the SQL Server. Returns a string of the selected database. ```PowerShell PS C:\> Show-DbaDbList -SqlInstance sqlserver2014a -SqlCredential $cred ``` -------------------------------- ### Example: 3 Source: https://github.com/dataplat/docs/blob/master/Install-DbaSqlPackage.html Downloads SqlPackage ZIP and extracts it to C:\SqlPackage ```powershell PS C:\> Install-DbaSqlPackage -Path C:\SqlPackage ``` -------------------------------- ### Example 3: Get installed patches for multiple instances Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches for multiple SQL Server instances specified in a list. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost","SQLSERVER2","SERVER3\SQLEXPRESS" ``` -------------------------------- ### Example 1: Get installed patches for a local instance Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches for the default SQL Server instance on the local machine. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" ``` -------------------------------- ### Example 8: Get startup parameters and output as a table Source: https://github.com/dataplat/docs/blob/master/Get-DbaStartupParameter.html This example retrieves the startup parameters for the local instance and formats the output as a table. ```powershell Get-DbaStartupParameter -SqlInstance "localhost" | Format-Table ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Show-DbaDbList.html Shows a GUI list of databases using Windows Authentication to connect to the SQL Server. Returns a string of the selected database. ```PowerShell PS C:\> Show-DbaDbList -SqlInstance sqlserver2014a ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Gets a list of SQL Server patches installed on HiramSQL1 and HiramSQL2. ```PowerShell Get-DbaInstalledPatch -ComputerName HiramSQL1, HiramSQL2 ``` -------------------------------- ### Example 3: Get executions within a specific date range Source: https://github.com/dataplat/docs/blob/master/Get-DbaSsisExecutionHistory.html This example retrieves execution history for executions that started between two specific dates. ```powershell Get-DbaSsisExecutionHistory -ServerInstance "localhost" -Folder "MyFolder" -Project "MyProject" -StartTime "2023-01-01" -EndTime "2023-12-31" ``` -------------------------------- ### Example 1: Basic Usage Source: https://github.com/dataplat/docs/blob/master/Start-DbaXESmartTarget.html This example demonstrates the basic usage of the Start-DbaXESmartTarget command. ```powershell Start-DbaXESmartTarget -Target "ServerName\InstanceName" ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/New-DbaDbMaskingConfig.html Process all tables and columns for database DB1 on instance SQLDB1 ```PowerShell PS C:\> New-DbaDbMaskingConfig -SqlInstance SQLDB1 -Database DB1 -Path C:\Temp\clone ``` -------------------------------- ### Example: 4 Source: https://github.com/dataplat/docs/blob/master/Install-DbaFirstResponderKit.html Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database. ```powershell PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 ``` -------------------------------- ### Example 4: Get restore history from a specific date Source: https://github.com/dataplat/docs/blob/master/Get-DbaDbRestoreHistory.html This example retrieves the restore history for the 'AdventureWorks' database starting from January 1, 2023. ```powershell Get-DbaDbRestoreHistory -SqlInstance "localhost" -Database "AdventureWorks" -StartDate "2023-01-01" ``` -------------------------------- ### Example 4: Get schema and exclude specific objects Source: https://github.com/dataplat/docs/blob/master/Get-DbaDbSchema.html This example retrieves schema information for the 'AdventureWorks' database but excludes tables starting with 'Sales'. ```powershell Get-DbaDbSchema -SqlInstance "localhost" -Database "AdventureWorks" -ExcludeTable "Sales*" ``` -------------------------------- ### Example: 5 Source: https://github.com/dataplat/docs/blob/master/Install-DbaFirstResponderKit.html Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database. ```powershell PS C:\> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" PS C:\> $servers | Install-DbaFirstResponderKit ``` -------------------------------- ### Example: 5 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMultiTool.html Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the DBA MultiTool in the main database. ```PowerShell $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" $servers | Install-DbaMultiTool ``` -------------------------------- ### Example 5: Get installed patches and filter by KB number Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves installed patches that match a specific Knowledge Base (KB) number. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -KBArticleID "KB5000000" ``` -------------------------------- ### Example: 5 Source: https://github.com/dataplat/docs/blob/master/Get-DbaMaintenanceSolutionLog.html Gets the outcome of the IndexOptimize job on sqlserver2014a, starting from july 18, 2017. ```PowerShell Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -Since '2017-07-18' ``` -------------------------------- ### Example: 4 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMultiTool.html Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the DBA MultiTool in the main database. ```PowerShell Install-DbaMultiTool -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 ``` -------------------------------- ### Example 1: Basic Usage Source: https://github.com/dataplat/docs/blob/master/Install-DbaSqlPackage.html This example demonstrates the basic usage of the DbaSqlPackage command to deploy a DACPAC file to a SQL Server instance. ```powershell Invoke-DbaSqlPackage -Path "C:\MyProject\MyProject.dacpac" -ServerInstance "localhost\SQLEXPRESS" -DatabaseName "MyDatabase" ``` -------------------------------- ### Example 13: Get installed patches and exclude specific service pack levels Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches except for those with the specified service pack levels. ```powershell Get-DbaInstalledPatch -SqlInstance "localhost" -ExcludeServicePackLevel 2 ``` -------------------------------- ### Example 10: Get backup header information and display specific properties Source: https://github.com/dataplat/docs/blob/master/Read-DbaBackupHeader.html This example retrieves header information and displays only the backup start date and database name. ```PowerShell Read-DbaBackupHeader -Path "C:\Backups\*.bak" | Select-Object BackupStartDate, DatabaseName ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/New-DbaLogin.html Creates a login on Server1 and Server2 with default parameters. You will be prompted to securely enter the password. ```PowerShell PS C:\> New-DbaLogin -SqlInstance Server1,Server2 -Login Newlogin ``` -------------------------------- ### Example 9: Get startup parameters and output as JSON Source: https://github.com/dataplat/docs/blob/master/Get-DbaStartupParameter.html This example retrieves the startup parameters for the local instance and formats the output as JSON. ```powershell Get-DbaStartupParameter -SqlInstance "localhost" | ConvertTo-Json ``` -------------------------------- ### Example: 3 Source: https://github.com/dataplat/docs/blob/master/Install-DbaSqlWatch.html Logs into server1\instance1 with SQL authentication and then installs SqlWatch in the DBA database. ```PowerShell Install-DbaSqlWatch -SqlInstance server1\instance1 -Database DBA -SqlCredential $cred ``` -------------------------------- ### Get proxy accounts by name Source: https://github.com/dataplat/docs/blob/master/Get-DbaAgentProxy.html This example retrieves proxy accounts whose names start with 'SQLAgent'. ```powershell Get-DbaAgentProxy -SqlInstance "localhost" -Name "SQLAgent*" ``` -------------------------------- ### Example: 2 Source: https://github.com/dataplat/docs/blob/master/Install-DbaSqlWatch.html Logs into server1\instance1 with Windows authentication and then installs SqlWatch in the DBA database. ```PowerShell Install-DbaSqlWatch -SqlInstance server1\instance1 -Database DBA ``` -------------------------------- ### Example 4: Get installed patches for instances from a file Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches for SQL Server instances listed in a text file, where each instance name is on a new line. ```powershell Get-DbaInstalledPatch -SqlInstance "C:\\Servers.txt" ``` -------------------------------- ### Example 2: Get installed patches for a remote instance with specific instance name Source: https://github.com/dataplat/docs/blob/master/Get-DbaInstalledPatch.html Retrieves all installed patches for a specific SQL Server instance named 'SQLSERVER2' on a remote machine. ```powershell Get-DbaInstalledPatch -SqlInstance "SQLSERVER2" ``` -------------------------------- ### Create a SQL Server login with default settings Source: https://github.com/dataplat/docs/blob/master/New-DbaLogin.html This example shows the simplest way to create a login with default settings. ```powershell New-DbaLogin -SqlInstance $sqlInstance -Name "DefaultUser" ``` -------------------------------- ### Get tables with a specific name pattern Source: https://github.com/dataplat/docs/blob/master/Get-DbaDbTable.html This example retrieves tables whose names start with 'Product' in the 'AdventureWorks' database. ```powershell Get-DbaDbTable -SqlInstance "localhost" -Database "AdventureWorks" -TableName "Product*" ``` -------------------------------- ### Get Check Constraints and Filter by Name Source: https://github.com/dataplat/docs/blob/master/Get-DbaDbCheckConstraint.html This example retrieves check constraints from all accessible SQL Server instances, but only those whose names start with 'CK_'. ```powershell Get-DbaDbCheckConstraint -All | Where-Object Name -like 'CK_%' ``` -------------------------------- ### Install SQL Server Instance with Default Configuration Source: https://github.com/dataplat/docs/blob/master/Install-DbaInstance.html This example installs a SQL Server instance using default configuration settings. ```powershell Install-DbaInstance -ComputerName "YourServerName" -InstanceName "YourInstanceName" -SqlVersion "2019" -Default -Credential (Get-Credential) ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Install-DbaMaintenanceSolution.html Installs Ola Hallengren's Solution objects on RES14224 in the DBA database. Backups will default to the default Backup Directory. If the Maintenance Solution already exists, the script will be halted. ```PowerShell Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -InstallJobs -CleanupTime 72 ``` -------------------------------- ### Example: 10 Source: https://github.com/dataplat/docs/blob/master/Get-DbaSsisEnvironmentVariable.html Gets all variables from Environments other than 'DEV' and 'PROD' on 'localhost' server, selects Name and Value properties for variables that names start with letter 'a' and outputs it as the GridView ```PowerShell PS C:\> 'localhost' | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD | Select-Object -Property Name, Value | Where-Object {$_.Name -match '^a'} | Out-GridView ``` -------------------------------- ### Example 1: Get a randomized type Source: https://github.com/dataplat/docs/blob/master/Get-DbaRandomizedType.html This example shows how to get a randomized type. ```powershell Get-DbaRandomizedType -ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace ``` -------------------------------- ### Start-DbaTrace Example Source: https://github.com/dataplat/docs/blob/master/Start-DbaTrace.html This example shows how to start a trace using Start-DbaTrace with specific event types and a file path. ```powershell Start-DbaTrace -TraceName "MyTrace" -FilePath "C:\Temp\MyTrace.trc" -Events @("RPC:Completed", "SQL:BatchCompleted") -OnServer "ServerName" ``` -------------------------------- ### Get-DbaBackupDevice Example 1: Get all backup devices Source: https://github.com/dataplat/docs/blob/master/Get-DbaBackupDevice.html This example shows how to get all backup devices. ```powershell Get-DbaBackupDevice -ComputerName localhost ``` -------------------------------- ### Example: 1 Source: https://github.com/dataplat/docs/blob/master/Install-DbaDarlingData.html Logs into server1 with Windows authentication and then installs all of Erik's scripts in the master database. ```PowerShell PS C:\> Install-DbaDarlingData -SqlInstance server1 -Database master ``` -------------------------------- ### Example: 3 Source: https://github.com/dataplat/docs/blob/master/Show-DbaDbList.html Shows a GUI list of databases using Windows Authentication to connect to the SQL Server. The "master" database will be selected when the lists shows. Returns a string of the selected database. ```PowerShell PS C:\> Show-DbaDbList -SqlInstance sqlserver2014a -DefaultDb master ``` -------------------------------- ### Example 3: Get the default path for a server Source: https://github.com/dataplat/docs/blob/master/Get-DbaDefaultPath.html This example shows how to get the default path for a server. ```powershell Get-DbaDefaultPath -SqlInstance sqlserver ```