当前位置:网站首页>Powershell 加域 Add-Computer模块
Powershell 加域 Add-Computer模块
2022-06-13 04:29:00 【期待未来的男孩】
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-computer?view=powershell-5.1
将本地计算机添加到域或工作组。
语法
PowerShell
复制
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>]
描述
该 cmdlet 将本地计算机或远程计算机添加到域或工作组,或将它们从一个域移动到另一个域。如果将计算机添加到没有帐户的域中,它还会创建一个域帐户。Add-Computer可以使用此 cmdlet 的参数指定组织单位 (OU) 和域控制器,或执行不安全的联接。若要获取命令的结果,请使用“详细”和“传递”参数。
案例
#域信息
$domain = "abc.com"
$User = "ADusername"
$Password = "ADpassword" | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($User,$Password)
#以新pc名加入到域
Add-Computer -DomainName $domain -Confirm:$false -Credential $credential
#重启电脑
Restart-Computer
结果
边栏推荐
- Discussion sur la modélisation de la série 143
- 第007天:go语言字符串
- 重读经典:《End-to-End Object Detection with Transformers》
- El expression
- Alipay native components (hotel time selection)
- 是“凯撒密码”呀。(*‘▽‘*)*
- [sword finger offer] interview question 25 Merge two ordered linked lists
- Notes on uni app
- php开发博客系统的首页头部功能实现
- Introduction to RFM analysis
猜你喜欢

记录一次排查问题的经过——视频通话无法接起

The data obtained from mongodb query data command is null

Dumi construit un blog documentaire

C盘无损移动文件

Use ASE encryption and decryption cache encapsulation in Vue project

Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT

Analysis of the implementation principle of an open source markdown to rich text editor

Common terms of electromagnetic compatibility

10 minutes to thoroughly understand how to configure sub domain names to deploy multiple projects

Li Kou brush question 338 Bit count
随机推荐
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
Redis
力扣刷题647.回文子串
EMC整改纲要
SEO specification
电磁兼容常用名词术语
【自动化测试】关于unittest你需要知道的事
出现Could not find com.scwang.smart:refresh-layout-kernel:2.0.3.Required by: project :app 无法加载第三方包情况
Simple static web page + animation (small case)
基于DE2-115平台的VGA显示
php开发博客系统的首页头部功能实现
[kubernetes series] pod chapter actual operation
PHP security development 15 user password modification module
Call C function in Lua
Redis主从复制、哨兵模式、集群
正态分布(高斯分布)
是“凯撒密码”呀。(*‘▽‘*)*
Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich
Gets or sets the content in an object
A simple understanding of consistent hash