Windows active directory属性导入出现问题

Windows active directory属性导入出现问题,windows,powershell,csv,attributes,active-directory,Windows,Powershell,Csv,Attributes,Active Directory,我正在尝试从下面的脚本中批量更新用户的广告属性,但我不断收到以下错误: Import-Csv : Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again. At line:1 char:11 从这个脚本: Import-Csv c:\update.csv | ForEac

我正在尝试从下面的脚本中批量更新用户的广告属性,但我不断收到以下错误:

Import-Csv : Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again.
At line:1 char:11
从这个脚本:

Import-Csv c:\update.csv | ForEach-Object { Set-QADUser -Identity $_.sAMAccountName -ObjectAttributes @{department={$_.department} ;
company={$_.company} ;
physicalDeliveryOfficeName={$_.physicalDeliveryOfficeName} ;
telephoneNumber={$_.telephoneNumber} ;
wWWHomePage={$_.wWWHomePage} ;homePhone={$_.homePhone};
title={$_.title}}}
任何帮助都将不胜感激


谢谢

错误来自CSV文件中的尾随空白列。导入Csv使用Csv中的第一行作为列的名称(除非您另有指定),当您有空列(或至少有多个空列)时,会导致此错误,因为它没有有效的名称。

这听起来像是Csv文件本身的问题。试着自己做,不要把它吹出来。