< Back

New-DataConnectionString

Tue Jan 14, 2020 1:26 am

NAME New-DataConnectionString



SYNOPSIS

Creates a connection string based on the given parameters.





SYNTAX

New-DataConnectionString [-ProviderName] <string> [-Parameters] <Hashtable> [[-TestConnection] <SwitchParameter>]

[<CommonParameters>]





DESCRIPTION

The New-DataConnectionString cmdlet creates a connection string based on parameters for a specific database

provider.



When the -TestConnection parameter is specified, the cmdlet tries to connect to a database with the newly created

connection string.





PARAMETERS

-ProviderName <string>

A database provider name.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Parameters <Hashtable>

A set of parameters that should be included in a connection string.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TestConnection <SwitchParameter>

Makes the cmdlet to test connectivity of a generated connection string.



Required? false

Position? 2

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String







RELATED LINKS