生活在宁静的角落 Windows
PS快速解锁AD 账号
查找账号: get-aduser -f {name -like '*santa*'} | format-list name,samaccountname
1.查询账号是否被锁定
Get-ADUser sean.shen -Properties * | Select-Object lockedout
解锁账号
Unlock-ADAccount -Identity sean.shen
MDT 客户端载入镜像出错
PING命令的各类反馈信息
1、Reply from 75.44.24.253: bytes=32 time=3ms TTL=254
C:\>ping 75.44.24.253
Pinging 75.44.24.253 with 32 bytes of data:
Reply from 75.44.24.253: bytes=32 time=3ms TTL=254
Reply from 75.44.24.253: bytes=32 time …
点击查看更多…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
Powershell 添加ad 组成员
Add-ADGroupMember -Identity <Groupname> -Members <useraccount>,<useraccount>,<useraccount>
参考地址:https://technet.microsoft.com/zh-cn/library/hh852331.aspx
点击查看更多…