title: Can't execute query to an Azure SQL Server from PowerShell
body: <p>I have a SQL Azure database and I try to execute the query from PowerShell.</p>
  
  <p>I am using <code>Invoke-Sqlcmd</code> Command.</p>
  
  <p>I get this error message:</p>
  
  <blockquote>
    <p>A network related or instance-specific error occurred while
    establishing a connection to SQL Server. The server was not found or
    was not accessible. Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections. (provider: Named
    Pipes Provider, error: 40 - Could not open a connection to SQL Server)</p>
  </blockquote>
  
  <p>But if I connect from Management Studio, everything is OK.</p>
  
  <p>I setup a proper firewall rule.</p>
  
  <p>Does anybody know what may happen?</p>