title: How to delete a row from a table in SQL Server using PowerShell script?
body: <pre><code>$uncServer = "\\10.243.174.102\e$"
  $uncFullPath = "$uncServer\New folder\Demo.txt"
  $username = "XYZ"
  $password = "xyz"
  
  net use $uncServer $password /USER:$username
  
  
  $SQLServer = "AP-PUN-SRSTEP29\MSSQLSERVER12" #use Server\Instance for named SQL instances! 
  $SQLDBName = "SystemDB"
  $SqlQuery = "Delete * from V_Solution WHERE Notes ='9.4.4'";
  
  $SqlConnection = New-Object System.Data.SqlClient.SqlConnection
  $SqlConnection.ConnectionString = "Server = $SQLServer; Database = $SQLDBName; Integrated Security = True"
  #$SqlConnection.open()
  
  
  $SqlCmd = New-Object System.Data.SqlClient.SqlCommand
  $SqlCmd.CommandText = $SqlQuery
  $SqlCmd.Connection = $SqlConnection
  
  $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
  $SqlAdapter.SelectCommand = $SqlCmd
  </code></pre>
  
  <p>I have SQL Server 2012 installed on a remote server and I want to delete a row from a particular table in a specific database, from a local machine using a PowerShell script. Is is possible to do that?</p>