Skip to content

Import-PSGetRepository throw "Type [System.Management.Automation.Platform] not found." #1387

Closed
@LaurentDardenne

Description

@LaurentDardenne

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Import-Module Microsoft.PowerShell.PSResourceGet
Import-PSGetRepository -verbose

Expected behavior

_Finds the repositories registered with PowerShellGet and registers them for PSResourceGet._

Actual behavior

Type [System.Management.Automation.Platform] not found.

Error details

C:\temp> $error[2]|select *


PSMessageDetails      :
Exception             : System.Management.Automation.RuntimeException: Type [System.Management.Automation.Platform]
                        introuvable.
                           à System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent
                        errorPos)
                           à System.Management.Automation.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
                           à
                        System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                        frame)
                           à
                        System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                        frame)
TargetObject          : System.Management.Automation.Platform
CategoryInfo          : InvalidOperation : (System.Management.Automation.Platform:TypeName) [], RuntimeException
FullyQualifiedErrorId : TypeNotFound
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : à Import-PSGetRepository, C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.PSRes
                        ourceGet\0.5.24\Microsoft.PowerShell.PSResourceGet.psm1 : ligne 15
                        à <ScriptBlock>, <Aucun fichier> : ligne 1
PipelineIterationInfo : {}

Environment data

Windows Powershell v5.1


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     0.5.24     Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...

Key   : PSVersion
Value : 5.1.19041.3031
Name  : PSVersion


Key   : PSEdition
Value : Desktop
Name  : PSEdition


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
Name  : PSCompatibleVersions


Key   : BuildVersion
Value : 10.0.19041.3031
Name  : BuildVersion


Powershell Core 

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion

Visuals

Windows Powershell v5.1
image

Powershell Core
image
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions