Thursday, September 8, 2016

Disable-AppvClientConnectionGroup does not work


Connection groups are enabled globally or for users.

Disable-AppvClientConnectionGroup can be run in the system context with -usersid <usersid> to target the relevant user. The -GroupID <GUID> -VersionID <GUID> can be used to target a particular connection group.

This command

Disable-AppvClientConnectionGroup * -usersid <usersid> 

should disable all the connection groups for the user, however this command will cause an error if other connection groups exist which are not enabled for the user.  At first this looks confusing however, because not all the connection groups are enabled for the user, it is unable to disable any of them and errors are reported:

disable-appvclientconnectiongroup : Operation cannot be completed because connection group is not enabled for the target of the operation. Please make sure that the connection group is enabled.
Operation attempted: Disable Connection Group.
AppV Error Code: 020000050A.
Please consult AppV Client Event Log for more details.
    + CategoryInfo          : InvalidResult: (:) [Disable-AppvClientConnectionGroup], ClientException
    + FullyQualifiedErrorId : DisableConnectionGroupError,Microsoft.AppV.AppvClientPowerShell.DisableAppvClientConnectionGroup