标签:ad
Import-Module ActiveDirectory
$groups = Get-Content C:\VMlists\AD.txt
echo $groups
foreach ($group in $groups)
{
Write-Host "Create $group"
$create = New-ADGroup -Name $group -GroupScope Global -Path "OU=Test,OU=ALL,OU=IT,DC=TEST,DC=NET"
}
DC上运行
Enable-PSRemoting
标签:ad
原文地址:http://littlebamboo.blog.51cto.com/4641172/1974273