powershell - Pester & AzureAdPreview 模块
问题描述
当我通过Invoke-Pester
.
错误是The term 'Get-AzureADObjectSetting' is not recognized as the name of a cmdlet, function, script file
。此 cmdlet 是通过 module 提供的AzureAdPreview
。
当我运行相同的测试文件时,Invoke-Pester -Script ./GroupFoobar.tests.ps1
是否不会引发此错误。
在某些情况下加载不同的 Pester 模块 - 我使用的是 Pester 4.0.4 版?
解决方案
好的,使用-Force
开关AzureAdPreview
解决了我的问题:
Import-Module Pester
Import-Module AzureAdPreview -Force
Import-Module Microsoft.Xrm.Data.Powershell
...
推荐阅读
- java - 给定一堆整数,请仅使用加号运算输出所有可能数字的所有组合
- amazon-web-services - 跨账户访问的 AWS S3 存储桶控制策略
- angular - 如何在 Angular 6 中使用 ngTagsInput?
- sql - 基于另一个表中提供的列名构建查询
- android - Android中的地理围栏触发问题
- ios - PopoverPresentationController 在触摸外部时不会被解雇
- android - 如何使用 Volley 将多个文件上传到节点 js 服务器?
- wcf - 通过 Web 服务启动的进程在一段时间后终止
- android - Android 更新管理器清除数据并清除缓存
- python - Flask 错误日志文件未在 VPS 上更新