小编Mic*_*man的帖子

PowerShell - 检查 .NET 类是否存在

我有一个 DLL 文件,正在导入到 PS 会话中。这将创建一个新的 .NET 类。在函数开始时,我想测试这个类是否存在,以及它是否不导入 DLL 文件。

目前我正在尝试给班级打电话。这可行,但我认为它会导致 Do {} Until () 循环出现问题,因为我必须运行脚本两次。

我的代码。请注意Do {} Until ()循环不起作用。 https://gist.github.com/TheRealNoob/f07e0d981a3e079db13d16fe00116a9a

I have found the [System.Type]::GetType() Method but when I run it against any kind of string, valid or invalid class, it doesn't do anything.

.net powershell types

8
推荐指数
2
解决办法
4761
查看次数

标签 统计

.net ×1

powershell ×1

types ×1