How to connect to / read from / write to SQL Server from Powershell?

First create the connection object, set the connection string and open the connection: $objSqlConnection = New-Object System.Data.SqlClient.SqlConnection $objSqlConnection.ConnectionString = “Server=YourSqlServer; Database=YourDataBase; User Id=YourUsername;...