Thor Logo dbatools

ConnectionString

New-DbaConnectionString

Chrissy LeMaire (@cl), netnerds.net

New-DbaConnectionString View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates connection strings for SQL Server instances using PowerShell-friendly parameters Description Creates properly formatted SQL Server connection strings without having to manually construct complex connection string syntax. Instead of remembering obscure keywords like “Data Source” or “Initial Catalog”, you can use familiar PowerShell parameters like -SqlInstance and -Database. This function handles the complexity of connection string building for you, including authentication methods (Windows, SQL Server, Azure AD), encryption settings, timeout values, and Azure SQL Database specifics.

Read more

New-DbaConnectionStringBuilder

zippy1981 | Chrissy LeMaire (@cl)

New-DbaConnectionStringBuilder View Source zippy1981 , Chrissy LeMaire (@cl) Windows, Linux, macOS Synopsis Creates a SqlConnectionStringBuilder object for constructing properly formatted SQL Server connection strings Description Creates a Microsoft.Data.SqlClient.SqlConnectionStringBuilder object from either an existing connection string or individual connection parameters. This allows you to programmatically build, modify, or validate connection strings without manually concatenating string values. The function handles authentication methods, encryption settings, connection pooling, and other SQL Server connection options, making it useful for scripts that need to connect to different SQL Server instances with varying configurations.

Read more