Cmdlets to provide and manage SQL servers for tests.
Returns connection parameters to new localDb.
New-SqlTestLocalInstance [[-Name] <String>] [[-Version] <Version>] [-Connected] [<CommonParameters>]
Uses [SqlLocalDB Utility](https://docs.microsoft.com/en-us/sql/tools/sqllocaldb-utility?view=sql-server-ver15) to get info about the available local db.
New-SqlTestLocalInstance
[PSCustomObject]
Name Value —- —– DataSource (LocalDb)\test-18f57083 ConnectionString Data Source=(LocalDb)\test-18f57083;Integrated Security=True Version v11.0
Specifies the name of the instance to create.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: ( New-DatabaseName )
Accept pipeline input: False
Accept wildcard characters: False
Specifies the version of the sql server.
Type: Version
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Speficies if a SqlClient connection should be created.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.