[英]Powershell script to add computer in AD
I am getting the below error while trying to add a computer object in AD by using Powershell.尝试使用 Powershell 在 AD 中添加计算机 object 时出现以下错误。
New-ADComputer -Name <Computer Name> -Path 'OU=Devices,DC=enterprise,DC=com' -Enabled $True
Error: New-ADComputer : A required attribute is missing
See example 1 at New-ADComputer .请参阅New-ADComputer中的示例 1。 I guess the parameter
-SamAccountName
is missing.我猜参数
-SamAccountName
丢失了。
New-ADComputer -Name "USER02-SRV2" -SamAccountName "USER02-SRV2" -Path "OU=ApplicationServers,OU=ComputerAccounts,OU=Managed,DC=USER02,DC=COM"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.