can you paste your script?
alternatively you can have a look at sample scripts: LE ACME-Exchange.ps1 Exchange 2016 Renewal issues
There are two possibilities from the symptoms you are describing:
A) The module was not installed correctly
B) The module was not imported in your script (you need to import modules)
Andrei