Can't find type [PesterConfiguration] in Azure DevOps pipeline

I can’t initialize $PesterConfiguration in v5 style by using

$PesterConfiguration = [PesterConfiguration]::Default

I get the error

[<<==>>] Exception: Unable to find type [PesterConfiguration].

I am using vmImage: 'windows-latest' in a Azure Devops pipeline and update Pester to 5.0.1 using PSDepend.

This seems to be successfull:

`Pester version : 5.0.1 C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules\Pester\5.0.1\Pester.psd1
PowerShell version : 5.1.17763.1007
OS version : Microsoft Windows NT 10.0.17763.0`

<p class=“lang-bsh prettyprint prettyprinted urvanov-syntax-highlighter-selected”>I can’t understand why it can not find the type, locally it is working completely fine with this.</p>
Best & Thanks,


I use the same version of Windows 10 (not a VM), hence the same PowerShell version, but using Pester 5.0.3. I couldn’t reproduce this.