title: Powershell Passing Variables with Procedure Call
body: <p>Updated as I think I'm getting closer. New error below.</p>
  <p>I am getting incorrect/invalid snytax errors when trying to run this. Can anyone guide me on what to change?</p>
  <pre><code>#Test-DbaConnection -SqlInstance $SqlInstance
  $Database = &quot;ITSBilling&quot;
  $results = Invoke-Sqlcmd -ServerInstance $SqlInstance -Database $Database -Query &quot;sp_APP_Create_Universal_Charge_Numbers 14, @PARENT = '$newserver', @LEVEL1 = '$billingsharename', @LEVEL2 = '$location', @LEVEL3 = '$billingsharename', @LEVEL4 = '$approver1', @CHARGECODES = '$chargecode', @STATUS = '@STATUS OUTPUT', @STATUSDESCRIPTION = '@STATUSDESCRIPTION OUTPUT'&quot;
  $results
  </code></pre>
  <pre><code>Invoke-Sqlcmd : Error converting data type varchar to int. 
   Msg 8114, Level 16, State 1, Procedure sp_APP_Create_Universal_Charge_Numbers, Line 0.
  </code></pre>