当前位置:网站首页>PowerShell plus domain add computer module
PowerShell plus domain add computer module
2022-06-13 04:36:00 【A boy looking forward to the future】
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-computer?view=powershell-5.1
Add the local computer to a domain or workgroup .
grammar
PowerShell
Copy
Add-Computer
[-ComputerName <String[]>]
[-LocalCredential <PSCredential>]
[-UnjoinDomainCredential <PSCredential>]
-Credential <PSCredential>
[-DomainName] <String>
[-OUPath <String>]
[-Server <String>]
[-Unsecure]
[-Options <JoinOptions>]
[-Restart]
[-PassThru]
[-NewName <String>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-Computer
[-ComputerName <String[]>]
[-LocalCredential <PSCredential>]
[-Credential <PSCredential>]
[-WorkgroupName] <String>
[-Restart]
[-PassThru]
[-NewName <String>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
describe
The cmdlet Add a local or remote computer to a domain or workgroup , Or move them from one domain to another . If you add a computer to a domain without an account , It also creates a domain account .Add-Computer You can use this cmdlet The parameter of specifies the organizational unit (OU) And domain controllers , Or perform an unsafe connection . To get the results of a command , Please use “ detailed ” and “ Pass on ” Parameters .
Case study
# Domain information
$domain = "abc.com"
$User = "ADusername"
$Password = "ADpassword" | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($User,$Password)
# With new pc Name join to domain
Add-Computer -DomainName $domain -Confirm:$false -Credential $credential
# Restart the computer
Restart-Computer
result
边栏推荐
- 你的一对一会议效率低下,你可以这么做!
- Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
- Idea Download
- The problem that ionic3 cannot automatically install the APK package
- Common terms of electromagnetic compatibility
- Redis主从复制、哨兵模式、集群
- 【剑指Offer】面试题24.反转链表
- SEO specification
- CreateAnonymousThreadX给匿名线程传递参数
- Interpretation and implementation of proxy mode
猜你喜欢
2022 ICML | Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets
CTFSHOW SQL注入篇(211-230)
Li Kou brush question 338 Bit count
Mongodb compass connects to the Alibaba cloud remote server database or reports an error occurred while loading instance info: command hostinfo req
一款开源的Markdown转富文本编辑器的实现原理剖析
前几年的互联网人vs现在的互联网人
Collection of wrong questions in soft test -- morning questions in the first half of 2011
Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich
[flutter problem Series Chapter 67] the Solution to the problem of Routing cannot be jumped again in in dialog popup Using get plug - in in flutter
Applet - uniapp realizes the functions of two-dimensional code picture pop-up and picture saving
随机推荐
CreateAnonymousThreadX给匿名线程传递参数
2022道路运输企业安全生产管理人员操作证考试题库及答案
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
NodeJS 解析 GET 请求 url 字符串
php 18 首页的文章列表功能实现
Day 007: go language string
Common ways to traverse map sets
The problem that ionic3 cannot automatically install the APK package
EMC整改纲要
SEO specification
PHP security development 15 user password modification module
一款开源的Markdown转富文本编辑器的实现原理剖析
[flutter problem Series Chapter 67] the Solution to the problem of Routing cannot be jumped again in in dialog popup Using get plug - in in flutter
Common terms of electromagnetic compatibility
Get parameters on link
Redis persistence mode AOF and RDB
力扣刷题647.回文子串
SQL advanced challenge (1 - 5)
knife4j aggregation 2.0.9支持路由文档自动刷新
Collection of some compatibility issues