当前位置: 移动技术网 > 科技>操作系统>windows > Windows Server 2016-Powershell加域并指定OU (二)

Windows Server 2016-Powershell加域并指定OU (二)

2019年02月27日  | 移动技术网科技  | 我要评论

快乐大本营在线观看直播,www.kan365.in,佳能r306

上章节提到通过netdom join加域并指定对应ou,本章再补充一例现成powershell加域并指定对应ou的脚本,便于大家工作中使用。

$plainpassword = p@ssw0rd
$username="administrator"
$domainname="azureyun.com"
$domainusername="$username@"+"$domainname"
$securepassword = $plainpassword | convertto-securestring -asplaintext -force
$domaincredentials = new-object system.management.automation.pscredential -argumentlist $domainusername,$securepassword
add-computer –newname 新计算机名 -domainname vlabc.com -oupath "ou=syncall,dc=azureyun,dc=com" -confirm:$false -credential $credential –restart

注解:红色字体,新计算机名位置属于您要更改的新计算机名即可。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网