您的位置:首页 > 运维架构 > Shell

使用PowerShell批量注册DLL到GAC

2014-04-21 13:39 253 查看
一段很小的代码,注册当前目录下所有的DLL到GAC,请先把gacutil.exe复制到同一个目录。

$Path = Get-Location
$Dir = Get-ChildItem "$Path" -Recurse
$Dlls = $Dir | Where { $_.extension -eq ".dll" }
$Dlls | ForEach-Object { .\gacutil.exe -i $_.name }


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: