我有一个 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.