title: Load Dataset to SQL script (in powershell)
body: <p>I would like to extract a large dataset from an SQL server database on one server and then include that dataset on another database on a different server. As link server is not an option, I have tried a powershell script, and would like something like:</p>
  
  <pre>
  $connection = New-Object System.Data.SqlClient.SqlConnection
  $command = New-Object System.Data.SqlClient.SqlCommand
  ... etc for SqlDataAdapter as well
  $adapter.Fill($dataset1)
  
  $connection2 = ... (to a database on another server)
  $command2 = ...
  Load $dataset1 into $command2
  $command2.Fill($dataset2)
  </pre>
  
  <p>How do I load dataset 1 into command 2?</p>