当我通过Invoke-Pester调用所有测试(*.tests.ps1)时,验证某些基础组设置的系统测试失败。
错误是The term 'Get-AzureADObjectSetting' is not recognized as the name of a cmdlet, function, script file。此cmdlet通过模块AzureAdPreview提供。
当我用Invoke-Pester -Script ./GroupFoobar.tests.ps1运行相同的测试文件时,这个错误没有出现。
在某些情况下加载不同的Pester模块-我使用的是Pester版本4.0.4?
发布于 2018-10-18 13:06:47
好的,使用AzureAdPreview的-Force开关解决了我的问题:
Import-Module Pester Import-Module AzureAdPreview -Force Import-Module Microsoft.Xrm.Data.Powershell ...
https://stackoverflow.com/questions/52849301
复制相似问题