只有在安装TMG的机子上才能跑,或者invoke-command 推到TMGserver上。
$ErrorActionPreference="SilentlyContinue"
#错误处理,不显示
$root=New-Object -ComObject fpc.root
$isa_array=$root.GetContainingArray()
$dnSets=$isa_array.RuleElements.DomainNameSets
$target=$dnSets.Item('test')
#$target==TMG内域名集 的名称
$url=Get-Content $HOME\desktop\url.txt
foreach ($i in $url){
$target.add($i)
}
$dnSets.Save()
Out-File -InputObject $Error -FilePath $HOME\desktop\Error.txt
powershell 批量添加TMG ISA 域名集
最新推荐文章于 2020-02-18 15:10:35 发布