This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting up the connection string (suggest using a sql account vs Windows login) | |
$dataSource = "<server name>" | |
$user = "username" | |
$pwd = "password" | |
$database = "<database name>" | |
$connectionString = "Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=False;" | |
#Create the query and store it in a variable | |
$query = "SELECT [<ColumnName>] FROM [<DatabaseName>].[dbo].[<tablename>]" |