I was playing with classes in some WPF based tool I built for creating included lists for ADMT.
Long story short, I created Class called ErrorMess with static method to throw messagebox with messageboxbutton and messageboximage.
When the script is started from ISE or console everything is OK but when I start it from cmd with -file argument to powershell.exe it throws ‘unable to find type’ for every type used in ErrorMess class.
While I was using all of them not wrapped in class everything worked fine. Tool was made for workmates who don’t use powershell (I pity the fools) so it’s kinda essential for it to be able to start with bat file. I could return to pre-class environment but I don’t want to if don’t have to…