You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PowerShell 7.3.4 and 5.1
PSResourceGet
Setup PSResourceRepository
Use Find-PSResource command
Expected behavior
Finds resource
Actual behavior
Throws error
Error details
Find-PSResource: The type initializer for 'Microsoft.PowerShell.PSResourceGet.Cmdlets.UserAgentInfo' threw an exception.ErrorRecord : Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.WasThrownFromThrowStatement : FalseTargetSite : System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSObject] Invoke(System.Collections.IEnumerable)Message : Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.Data : {}InnerException : System.NotSupportedException: Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.HelpLink : Source : System.Management.AutomationHResult : -2146233087StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke[T]() at Microsoft.PowerShell.PSResourceGet.Cmdlets.UserAgentInfo..cctor()Get-Variable: Cannot find a variable with the name 'PackageManagementProvider'.Get-Variable: Cannot find a variable with the name 'SourceLocation'.Get-Variable: Cannot find a variable with the name 'PackageManagementProvider'.Get-Variable: Cannot find a variable with the name 'SourceLocation'.
Environment data
Directory: C:\program files\powershell\7\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
--------------------------------------------------------
Binary 1.0.4.1 Microsoft.PowerShell.PSResourceGet Core,Desk {Find-PSResource,Get-InstalledPSResourc…
Name Value
---------
PSVersion 7.4.3
PSEdition Core
GitCommitId 7.4.3
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
n/A
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
PowerShell 7.3.4 and 5.1
PSResourceGet
Setup PSResourceRepository
Use Find-PSResource command
Expected behavior
Finds resource
Actual behavior
Throws error
Error details
Environment data
Visuals
n/A
The text was updated successfully, but these errors were encountered: