Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules not imported in Get-Office365Forwarders #1

Open
adamsewell opened this issue Dec 5, 2021 · 4 comments
Open

modules not imported in Get-Office365Forwarders #1

adamsewell opened this issue Dec 5, 2021 · 4 comments

Comments

@adamsewell
Copy link

I was testing your Get-Office365Forwarders script, and noticed that you check if the MSOnline and ExchangeOnlineManagement are installed but you never actually import them in your script causing the Connect-MsolService to fail as the function doesn't exist.

@kieranwalsh
Copy link
Owner

kieranwalsh commented Dec 5, 2021

Oh, I've not had to import a module for years. Since PS 3, modules get imported automatically don't they? Which version of PS are you using?
It's possible you may have to close and re-open PowerShell before the updated modules become available though. Let me know if restarting the console works and I'll add a message in an updated version.

@adamsewell
Copy link
Author

It must be something funky with the Windows Terminal, I tried it in the Powershell terminal and it worked fine.

@kieranwalsh
Copy link
Owner

Yes, I've not used that. Will try in the morning and then do a test on the host type - importing if needed. Thanks for letting me know.

@kieranwalsh
Copy link
Owner

I've updated it to work with Windows Terminal by importing the modules. Let me know if it works for you when you have a chance 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants