title: Is it possible to create a Microsoft SMO SQL connection using server credentials in powershell?
body: <p>So I have the following code which I believe creates a connection to the local SQL server on my machine using windows credentials.</p>
  
  <pre><code>$ServerObj = New-Object ("Microsoft.SqlServer.Management.Smo.Server") "(local)"
  </code></pre>
  
  <p>Is it possible to specify that I want to use server credentials to connect instead?</p>
  
  <p>i.e. connect using a server username and password rather than my windows credentials</p>