PowerShell添加本地账户脚本分享

2023-12-05 0 506

脚本源码:
复制代码 代码如下:
$nt=[adsi]\”WinNT://localhost\”
$user=$nt.create(\”user\”,\”test\”)
$user.setpassword(\”password\”)
$user.setinfo()
Get-WmiObject -Class Win32_UserAccount -Filter \”name = \’test\’\” | Set-WmiInstance -Argument @{PasswordExpires = 0}
$group=[ADSI]\”WinNT://localhost/administrators,group\”
$group.add(\”WinNT://localhost/test\”)

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 PowerShell PowerShell添加本地账户脚本分享 https://www.u-9.cn/jiaoben/powershell/101057.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务