powershell 批量更新用户账号属性

命令:

Import-Csv 'd:\phone.csv' | % { Set-ADUser -identity $_.'samaccountname' -mobilephone $_.'mobilephone' -OfficePhone $_.officephone }

phone.csv 内容如下:

samaccountname,MobilePhone,officephone
account,(86) 21 1234567 ,(86) 098765454331

加班不给钱