Skip to content
生活在宁静的角落

生活在宁静的角落

  • Home
  • Linux
    • Nagios
  • Windows
    • Powershell
    • AD Domain
  • Virtual
  • Applications
    • django
    • Python
  • Storage
  • Network
  • Security
  • Work
  • Life
    • English
    • Download

powershell 批量更新用户账号属性

2020年4月26日2018年8月23日 by 加班不给钱

命令:

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

phone.csv 内容如下:

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

Categories Powershell, Windows Tags powershell
Powershell 添加ad 组成员
修改 WSL Ubuntu 18.04 默认源为阿里云镜像

近期文章

  • Windows 10 自带VPN 拨号 飞塔防火墙
  • Hyper-V三种虚拟网络类型的理解
  • sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: ‘select 1’
  • nginx开启Gzip压缩
  • 系统稳定性治理最佳实践(万字长文)
2023年 9月
一 二 三 四 五 六 日
 123
45678910
11121314151617
18192021222324
252627282930  
« 4月    

  • 126
  • 30
  • 2,327
  • 16,236
  • 148,353
  • 148,353
  • 34,289
  • 25
  • 232
  • 2023年4月23日
登录
© 2023 生活在宁静的角落 • 工业和信息化部备案管理系统网站 沪ICP备14021346号-1