I have a DLL file that I am importing into the PS session. This creates a new .NET class. At the start of the function I want to test if this class exists, and if it doesn't import the DLL file.
Currently I am trying to call the class. This works but I think it's causing problems with the Do {} Until () loop since I have to run the script twice.
my code. note the Do {} Until ()
loop isn't working.
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.