I AM TRYING TO USE CLASS DEFINED IN A MODULE INSIDE A POWERSHELL SCRIPT. ALL INTERNET RESOURCES I HAVE FOUND INDICATE THAT THIS CODE SHOULD WORK. BUT IT DOES NOT IN MY CASE.
USING MODULE C:\TEST.PSM1; [TEST]
WHEN RUNNING THIS SCRIPT, I GET ERROR SAYING THAT TEST IS NOT DEFINED. BUT I HAVE READ INTERNET POSTS ABOUT USING THIS SYNTAX, AND IT WORKES IN THOSE POSTS. I DO NOT KNOW WHY IT DOES NOT WORK FOR ME.
HAVE ANY IDEA? IS MY POWER SHELL BROKEN?
FOR ANY POTENTIAL REPLYS, THANK YOU.
I can't reproduce your problem as your code works for me in both ISE and PowerShell console.
Please stop using all capital letters in your posts it makes them more difficult to read
You must be logged in to reply to this topic.