title: Positional parameter cannot be found error while using powershell to update Active Directory
body: <p>I'm attempting to update Active Directory user entries with a CSV.  When I run it I get the following error, and I cannot understand why.  The column containing the account name is not null.</p>
  
  <pre><code>    Set-ADUser : A positional parameter cannot be found that accepts argument '$null'.
  At line:2 char:11
  + Set-ADUSer &lt;&lt;&lt;&lt;  -Identity $_.sAMAccountName`
      + CategoryInfo          : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADUser
  
  (repeat for each row in the CSV)
  </code></pre>
  
  <p>Here is my existing update script:</p>
  
  <pre><code>Import-Module ActiveDirectory
  $userList = Import-Csv '.\UpdatedUserInfo.csv'
  
  $userList|Foreach{
  Set-ADUSer -Identity $_.sAMAccountName`
  -givenName = $user.givenName`
  -initials = $user.initials`
  -sn = $user.sn`
  -cn = $user.name`
  -displayName = $user.displayName`
  -department = $user.department`
  -telephoneNumber = $user.telephoneNumber`
  -facsimileTelephoneNumber = $user.facsimileTelephoneNumber`
  -mobile = $user.mobile`
  -homePhone = $user.homePhone`
  -company = $user.Company`
  -physicalDeliveryOfficeName = $user.physicalDeliveryOfficeName`
  -streetAddress = $user.streetAddress`
  -l = $user.l`
  -postOfficeBox = $user.postOfficeBox`
  -state = $user.st`
  -postalCode = $user.postalCode
  }
  </code></pre>