how to export a class in powershell v5 module

后端 未结 10 706
不思量自难忘°
不思量自难忘° 2020-12-08 14:53

I\'ve got a module setup to be like a library for a few other scripts. I can\'t figure out how to get a class declaration into the script scope calling Import-Module

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 14:58

    I have tried every approach on this page and I have YET to find one that works repeatedly. I find the module caching is the most frustrating aspect of this... I can import classes as modules and even get code to work, but powershell only recognizes the new class intermittently.. its almost like Powershell just forgets you ever added one...

提交回复
热议问题