חייב לבדוק את זה!!
$query = "SELECT * FROM activedir"
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString#$connection.ConnectionString = "Server=$dataSource;Database=$database;Integrated Security=True;"$connection.Open()$command = $connection.CreateCommand()$command.CommandText = $query