重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

win10加域

<#

创新互联建站是一家专业从事成都做网站、成都网站设计、网页设计的品牌网络公司。如今是成都地区具影响力的网站设计公司,作为专业的成都网站建设公司,创新互联建站依托强大的技术实力、以及多年的网站运营经验,为您提供专业的成都网站建设、营销型网站建设及网站设计开发服务!

文件:domain.ps1

用途:用于加域功能脚本

#>

#修改计算机名

Rename-Computer -NewName hz

#添加DNS

Get-DnsClientServerAddress -AddressFamily IPv4 |Out-GridView -PassThru |foreach { Set-DnsClientServerAddress -InterfaceIndex $_.InterfaceIndex -Addresses '192.168.3.200'}

ifconfig /flushdns

#加域

$domain = "company" 

$password = ConvertTo-SecureString "qwe123!@#" -AsPlainText -Force

$username = "$domain\ad" 

$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password

Add-Computer -DomainName $domain -Credential $credential

#重启电脑

Restart-Computer


文章标题:win10加域
当前网址:http://cqcxhl.com/article/gsgjoi.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP