上章节提到通过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 azureyun.com -OUPath "OU=syncall,DC=azureyun,DC=com" -Confirm:$false -Credential $Credential –Restart

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

欢迎关注微信公众号:小温研习社

最新文章

  1. Debian下安装mono
  2. 关于tomcat访问managerapp出现403报错的解决方法
  3. C#中考虑为大对象使用弱引用
  4. 深度学习笔记------windows系统下进行Linux-Ubuntu14.04双系统安装笔记(二)
  5. demo工程的清单文件及activity中api代码简单示例
  6. java.util.concurrent Class ThreadPoolExecutor
  7. HTML5 CSS3简要教程
  8. 我的CMS心路历程,DNN And Umbraco
  9. Effective c++ 第一章 让自己习惯C++
  10. TensorFlow问题:The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
  11. [Python Study Notes]进程信息(丁丁软件监控进程,http-post)
  12. [Codeforces Round #516][Codeforces 1063C/1064E. Dwarves, Hats and Extrasensory Abilities]
  13. [Swift]LeetCode915.将分区数组分成不相交的间隔 | Partition Array into Disjoint Intervals
  14. mysql 数据备份和还原
  15. C#模拟Https请求时出现 基础连接已经关闭 未能为 SSLTLS 安全通道建立信任关系
  16. abc
  17. 数据库-mysql命令
  18. 用wifi来调试应用程序
  19. 【CI】CN.一种多尺度协同变异的微粒群优化算法
  20. [Object Tracking] Identify and Track Specific Object

热门文章

  1. Markdown 编辑器语法 专题
  2. 找jar包的网站 还没用过2017.12.19
  3. Python使用Socket写一个简单聊天程序
  4. javascript项目实战---ajax实现无刷新分页
  5. 手机端实现fullPage——全屏滚动效果
  6. selenium设置proxy、headers(phantomjs、Chrome、Firefox)
  7. Java Script 学习笔记 (二) Casper JS
  8. Selenium 三种等待
  9. Golang 知识点总结
  10. BZOJ_3993_[SDOI2015]星际战争_二分+网络流