how to export a class in powershell v5 module

后端 未结 10 704
不思量自难忘°
不思量自难忘° 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 15:00

    According to here and here, you can use classes defined in your module by doing the following in PowerShell 5:

    using module holidays
    

提交回复
热议问题