您的位置:首页 > 运维架构 > Shell

让Windows加入域的PowerShell

2015-06-03 15:00 706 查看
$domain = "midrange.lab"
$password = "MyPassword!" | ConvertTo-SecureString -asPlainText -Force
$username = "$domain\administrator"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
Add-Computer -DomainName $domain -Credential $credential

 

来源

========================

Join Computer to Domain With Powershell (One-Click Method)

http://community.spiceworks.com/scripts/show/1540-join-computer-to-domain-with-powershell-one-click-method
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: