title: Powershell - passing variable into loop for string with quotes
body: <p>I'm trying to understand how to setup my script so that single quotes will wrap around my variable. I have a list of 1500 customers I need to repeat my script for, so my thought as to do a foreach loop.</p>
  <pre><code>$customerlist = Invoke-Sqlcmd -Query &quot;SELECT [CustomerNo] FROM [TABLE]&quot; -ServerInstance &quot;SERVER\INSTANCE&quot;
  #Loop through 
  foreach ($customer in $customerlist)
  {
      $inputParams = @{
        &quot;CustomerNo&quot; = &quot;'&quot;+$customer+&quot;'&quot;;
      }
  ....Do rest of script
  }
  </code></pre>
  <p>I need the $customer variable in my $inputparams to show with the string value in single quotes, e.g. '01233456' instead of just 0123456. I've tried several different iterations of &quot;'&quot;+$customer+&quot;'&quot; but cannot seem to get the correct syntax. Could someone help me out?</p>