I have now successfully converted my script to a module(.psm1), it loads, but immediately gives this error! What am I doing wrong please?
PS 337 D:\Scripts> import-module -name d:\scripts\modules\modem\modem.psm1 -global -force
Calculating total connect time of all GPRS modem devices...
Total online usage since 30/10/2017 is 00:22:00 minutes (5 Mb)
PS 338 D:\Scripts> modem
modem : The term 'modem' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ modem
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (modem:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS 339 D:\Scripts> get-module -name modem
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.0 modem {AddTime, convert, SubtractTime}