Closed NZLostboy closed 2 weeks ago
Connect-ExchangeOnline loads that function.
Sorry you are right. The issue was the test account I was trying to use didn't have the right license, and I didn't realise.
A shame that it doesn't provide a better error, but its working as intended now thank you.
It is a valid point. I would have expected the skipped reason to surface the license gap, did it not?
It is a valid point. I would have expected the skipped reason to surface the license gap, did it not?
It did when I ran the whole function, so the code your talking about is working correctly. The issue was that I was trying the command directly which obviously didn't work, but its not clear that the issue is because of the license and not that the cmdlet doesn't exist.
For reference, if you run Get-SafeLinksPolicy
without the right license you get the following error:
Get-SafeLinksPolicy: The term 'Get-SafeLinksPolicy' is not recognized as a name of a cmdlet, function, script file, or executable program.
The
Get-MtExo
function (https://maester.dev/docs/commands/Get-MtExo) has the following command on line 58:Looking at the
Get-SafeLinksPolicy
cmdlet, it uses the ExchangePowerShell module, and I can't find anywhere where this is installed or referenced currently?I might be missing something here, but I can't see how this is currently working. I don't think we can use the
ExchangePowerShell
module as it relies on Windows PowerShell.This is currently used by
Test-MtCisaSafeLink
, and I had planned to use it for a newTest-MtCisSafeLink
test I am building currently.Not sure how to proceed here or if I am missing something