Cmdlets to provide and manage SQL servers for tests.
Returns connection parameter for a SQL server.
Get-SqlTestInstance [-ProgressAction <ActionPreference>] [<CommonParameters>]
Checks whether LocalDB is available and returns its instance information. If unavailable, writes an error.
Get-SqlTestInstance
Gets an available LocalDB instance. Requires PsSqlLocalDb and an installed LocalDB utility.
Captured output (instance name and version vary by environment):
Name : <redacted> Version : 15.0.4382.1 DataSource : (LocalDb)\<redacted> ConnectTimeout : 30 ConnectionString : Data Source=(LocalDb)\<redacted>;Connect Timeout=30;Integrated Security=True IsLocalDb : True
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
https://abbgrade.github.io/PsSqlTestServer/docs/Get-SqlTestInstance.html