The PowerShell SQL Client module aims to replace to the SQL Server utilities SQLCMD and BCP
Connect-TSqlInstance [-DataSource] <String> [-Port <Int32>] [[-InitialCatalog] <String>]
[-TrustServerCertificate] [-ConnectTimeout <Int32>] [-ConnectRetryCount <Int32>]
[-ConnectRetryInterval <Int32>] [-Authentication <SqlAuthenticationMethod>] [-IntegratedSecurity]
[<CommonParameters>]
Connect-TSqlInstance [-ConnectionString] <String> [-Authentication <SqlAuthenticationMethod>]
[-IntegratedSecurity] [<CommonParameters>]
Connect-TSqlInstance [-ConnectionString] <String> [-Authentication <SqlAuthenticationMethod>]
[-IntegratedSecurity] -AccessToken <String> [<CommonParameters>]
Connect-TSqlInstance [-ConnectionString] <String> [-Authentication <SqlAuthenticationMethod>]
[-IntegratedSecurity] [-AcquireToken] [<CommonParameters>]
Connect-TSqlInstance [-DataSource] <String> [-Port <Int32>] [-InitialCatalog] <String>
[-TrustServerCertificate] [-ConnectTimeout <Int32>] [-ConnectRetryCount <Int32>]
[-ConnectRetryInterval <Int32>] [-Authentication <SqlAuthenticationMethod>] [-IntegratedSecurity]
-AccessToken <String> [<CommonParameters>]
Connect-TSqlInstance [-DataSource] <String> [-Port <Int32>] [-InitialCatalog] <String>
[-ConnectTimeout <Int32>] [-ConnectRetryCount <Int32>] [-ConnectRetryInterval <Int32>]
[-Authentication <SqlAuthenticationMethod>] [-IntegratedSecurity] [-AcquireToken] [-Resource <String>]
[<CommonParameters>]
Connect-TSqlInstance [-DataSource] <String> [-Port <Int32>] [[-InitialCatalog] <String>]
[-TrustServerCertificate] [-ConnectTimeout <Int32>] [-ConnectRetryCount <Int32>]
[-ConnectRetryInterval <Int32>] [-Authentication <SqlAuthenticationMethod>] [-IntegratedSecurity]
[-UserId] <String> [-Password] <SecureString> [<CommonParameters>]
Connect-TSqlInstance [-DataSource] <String> [-Port <Int32>] [[-InitialCatalog] <String>]
[-TrustServerCertificate] [-ConnectTimeout <Int32>] [-ConnectRetryCount <Int32>]
[-ConnectRetryInterval <Int32>] [-Authentication <SqlAuthenticationMethod>] [-IntegratedSecurity]
[-Credential <PSCredential>] [<CommonParameters>]
PS C:\>
Type: String
Parameter Sets: ConnectionString_withToken, Properties_Basic_withToken
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: ConnectionString
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Type: String
Parameter Sets: ConnectionString_withToken, ConnectionString_acquireToken
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Type: String
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: Server, ServerName, ServerInstance
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: Properties_Basic, Properties_Credential, Properties_CredentialObject
Aliases: Database, DatabaseName
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: Properties_Basic_withToken, Properties_Basic_acquireToken
Aliases: Database, DatabaseName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: SecureString
Parameter Sets: Properties_Credential
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: Properties_Credential
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Type: SqlAuthenticationMethod
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: RetryCount
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: RetryInterval
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: PSCredential
Parameter Sets: Properties_CredentialObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: ConnectionString_acquireToken, Properties_Basic_acquireToken
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Properties_Basic_acquireToken
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Credential, Properties_CredentialObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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.