title: Set-ADuser 'serialNumber' attributes from CSV
body: <p>I have tried to set the attribute 'serialNumber' using a CSV file but I keep getting an error message after hitting Enter.</p>
  
  <p>Here's my script</p>
  
  <pre><code>ipmo activedirectory
  $users = Import-Csv -Path C:\Temp\test.csv
  foreach ($user in $users) {
      $sam = $user.sAMAccountName
      $serial = $user.serialNumber
      Get-ADUser -Filter {sAMAccountName -eq $sam} -Properties serialNumber | 
      Set-ADUser -Replace @{serialNumber = $serial}
  }
  </code></pre>
  
  <p>The format of my CSV</p>
  
  <pre><code>sAMAccountname;serialNumber
  name;2357
  </code></pre>
  
  <p>The command stops at '-Replace (...)'</p>
  
  <p>Do you have any idea where I am wrong?</p>
  
  <p>Thanks ;)</p>