title: Apply service packs (.msu file) update using powershell scripts on local server
body: <p>What it basically does is the script gets the .msu files from a location and copies to the "C:\temp\" folder.
  Then the script gets all the .msu files and stores the names in the array.
  Using the foreach loop it tries to apply the .msu updates to the local server where the script is running.</p>
  
  <p>However when i run the script. It doesn't do anything.</p>
  
  <p>Below is the code </p>
  
  <pre><code>$from="sourceLocation\*.msu"
  $to="C:\temp\"
  Copy-Item $from $to -Recurse -Force
  $listOfMSUs= (Get-ChildItem –Path $to -Filter "*.msu").Name
  Write-Host $listOfMSUs
  
  if($listOfMSUs)
  {
      foreach($msu in $listOfMSUs)
      {
      Write-Host "Processing The Update"
      &amp;  wusa $to$msu /quiet /norestart         
      }
  }
  else{
  
  Write-Host "MSUs doesnt exists"
  }
  </code></pre>
  
  <p>Any suggestions please?</p>