Windows Server 2016-Powershell加域并指定OU (二)
2024-10-16 04:19:07
上章节提到通过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
注解:红色字体,新计算机名位置属于您要更改的新计算机名即可。
欢迎关注微信公众号:小温研习社
最新文章
- Debian下安装mono
- 关于tomcat访问managerapp出现403报错的解决方法
- C#中考虑为大对象使用弱引用
- 深度学习笔记------windows系统下进行Linux-Ubuntu14.04双系统安装笔记(二)
- demo工程的清单文件及activity中api代码简单示例
- java.util.concurrent Class ThreadPoolExecutor
- HTML5 CSS3简要教程
- 我的CMS心路历程,DNN And Umbraco
- Effective c++ 第一章 让自己习惯C++
- 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.
- [Python Study Notes]进程信息(丁丁软件监控进程,http-post)
- [Codeforces Round #516][Codeforces 1063C/1064E. Dwarves, Hats and Extrasensory Abilities]
- [Swift]LeetCode915.将分区数组分成不相交的间隔 | Partition Array into Disjoint Intervals
- mysql 数据备份和还原
- C#模拟Https请求时出现 基础连接已经关闭 未能为 SSLTLS 安全通道建立信任关系
- abc
- 数据库-mysql命令
- 用wifi来调试应用程序
- 【CI】CN.一种多尺度协同变异的微粒群优化算法
- [Object Tracking] Identify and Track Specific Object
热门文章
- Markdown 编辑器语法 专题
- 找jar包的网站 还没用过2017.12.19
- Python使用Socket写一个简单聊天程序
- javascript项目实战---ajax实现无刷新分页
- 手机端实现fullPage——全屏滚动效果
- selenium设置proxy、headers(phantomjs、Chrome、Firefox)
- Java Script 学习笔记 (二) Casper JS
- Selenium 三种等待
- Golang 知识点总结
- BZOJ_3993_[SDOI2015]星际战争_二分+网络流