Skip to content

AppvClientPackage doesnt work in Powershell 7 #28391

Open

Description

Prerequisites

Steps to reproduce

Get-AppvClientPackage -All -Name "GPL-NotepadPlusPlus-8.9.8-x64-ML-001"

RunspaceId : aa97fc32-6732-4f01-80fe-6255ec010f9f
PackageId : 8cc46725-46bb-4bab-a363-5a6cbbf03f38
VersionId : 0ad98446-bf4f-4ebb-b2a1-7e4a3d214a0d
Name : GPL-NotepadPlusPlus-8.9.8-x64-ML-001
Version : 0.0.0.7
Path : C:\Users\taagach0\OneDrive - Swisscom\Git\Git-repos\PSADTCurrent\2.0.0_beta\Files\GPL-NotepadPlu
sPlus-8.9.8-x64-ML-001\GPL-NotepadPlusPlus-8.9.8-x64-ML-001.appv
IsPublishedToUser : False
UserPending : False
IsPublishedGlobally : False
GlobalPending : False
InUse : False
InUseByCurrentUser : False
PackageSize : 84789155
PercentLoaded : 0
IsLoading : False
HasAssetIntelligence : True

$p = Get-AppvClientPackage -All -Name "GPL-NotepadPlusPlus-8.9.8-x64-ML-001"
PS C:\Users\taagach0> Remove-AppvClientPackage -Package $p
Remove-AppvClientPackage: Cannot bind parameter 'Package'. Cannot convert the "Microsoft.AppV.AppvClientPowerShell.AppvClientPackage" value of type "Deserialized.Microsoft.AppV.AppvClientPowerShell.AppvClientPackage" to type "Microsoft.AppV.AppvClientPowerShell.AppvClientPackage".

all appvclientpackage commandlets have this issue when trying to use -Package parameter or when trying to pipe objects to the commandlets

Expected behavior

Get-AppvClientPackage -All -Name ""| Publish-AppvClientPackage > Publishes package
Get-AppvClientPackage -All -Name ""| Remove-AppvClientPackage > Removes package

This all works as Expected in PS 5.1

Actual behavior

Fails with error about Type. seems to be caused by the Compatibility layer.

Error details

Cannot bind parameter 'Package'. Cannot convert the "Microsoft.AppV.AppvClientPowerShell.AppvClientPackage" value of type "Deserialized.Microsoft.AppV.AppvClientPowerShell.AppvClientPackage" to type "Microsoft.AppV.AppvClientPowerShell.AppvClientPackage".

Environment data

PowerShell 7.7.0
PS C:\Windows\System32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.7.0
PSEdition                      Core
GitCommitId                    7.7.0
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Activity

  1. mklement0 commented on Nov 11, 2026

    @mklement0
    Contributor

    I'm only guessing, but it sounds like the AppVClient is running via the Windows PowerShell Compatibility feature, and the problem may be that the implicitly deserialized instance in $p is passed as as an argument; see if passing $p via the pipeline makes a difference:
    $p | Remove-AppvClientPackage

  2. AkitoTheGambler commented on Nov 11, 2026

    @AkitoTheGambler
    Author

    yeah that is the issue. its running through the PowerShell Compatibility feature
    $p | Remove-AppvClientPackage
    also doesnt work due to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions