The PowerShell SQL Client module aims to replace to the SQL Server utilities SQLCMD and BCP
Invoke-TSqlProcedure [-Procedure] <String> [-Schema <String>] [-Database <String>] [[-Parameter] <Hashtable>]
[-Timeout <Int32>] [-Connection <SqlConnection>] [<CommonParameters>]
Invoke-TSqlProcedure [-Text] <String> [[-Parameter] <Hashtable>] [-Timeout <Int32>]
[-Connection <SqlConnection>] [<CommonParameters>]
Invoke-TSqlProcedure [-InputFile] <FileInfo> [[-Parameter] <Hashtable>] [-Timeout <Int32>]
[-Connection <SqlConnection>] [<CommonParameters>]
PS C:\>
Type: SqlConnection
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: StoredProcedure
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: FileInfo
Parameter Sets: TextFile
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: StoredProcedure
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: StoredProcedure
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: Text
Aliases: Command, Query
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: Int32
Parameter Sets: (All)
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.