欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PowerShell添加本地賬戶腳本分享

 更新時間:2015年03月25日 09:21:58   投稿:junjie  
這篇文章主要介紹了PowerShell添加本地賬戶腳本分享,本文直接給出實(shí)現(xiàn)代碼,需要的朋友可以參考下

腳本源碼:

復(fù)制代碼 代碼如下:

$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")

相關(guān)文章

最新評論