luov之计算机加入域脚本

PowerShell-计算机加入域脚本
Function Join-Domain { param( [string]$domain=$(read-host "Please specify the domain to join"), [System.Management.Automation.PSCredential]$Credential = $(Get-Credential) ) $CS = Get-WmiObject Win32_ComputerSystem $CS.JoinDomainOrWorkgroup($Domain,$Credential.GetNetworkCredential().Password,$Credential.UserName,$null,3) }
脚本功能:计算机加入域
更多分享:luov和他的伙伴们的知识管理luov.net

你可能感兴趣的:(脚本,计算机加入域,计算机加入域脚本)