Grant-AppvServerPackage

Grants an entitlement to a package.

Syntax

Grant-AppvServerPackage
     [-AppvServerPackage] <PackageVersion>
     [-Groups] <String[]>
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-AppvServerPackage
     [-Groups] <String[]>
     [-PackageID] <Guid>
     [[-VersionID] <Guid>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-AppvServerPackage
     [-Groups] <String[]>
     [-Name] <String>
     [[-Version] <String>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Grant-AppvServerPackage cmdlet grants an Active Directory entitlement to an existing package.

Examples

1:

Parameters

-AppvServerPackage

Specifies an array of AppVServerPackage objects.

Type:PackageVersion
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Groups

Specifies an array of names of Active Directory groups.

Type:String[]
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the friendly name of the package given when the package was created. This value is obtained from the package manifest.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PackageID

Specifies a GUID that uniquely identifies the package. It can be found in the package manifest or by opening the package in the Microsoft Application Virtualization (App-V) sequencer. The package GUID is shared by all versions of a specific package.

Type:Guid
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Version

Specifies the version of an App-V package in one specific lineage. If you do not specify a version, the cmdlet acts on all versions saved on computer.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VersionID

Specifies a GUID that differentiates a package version from other versions, whether older, newer, or of a completely different lineage. If you do not specify this parameter, the cmdlet operates on all versions of the package.

Type:Guid
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AppvServer.AppvServerPackage

Notes

  • If the cmdlet cannot find the specified package, the cmdlet returns the following error: The specified package could not be found on the system. The cmdlet fails the operation.

  • If you specify an invalid group, the cmdlet return the following error: The provided entitlements are not valid. The cmdlet fails the operation.

  • If you do not specify version information, the cmdlet takes action on all available versions of the package.

  • If the Groups parameter is set to $Null, this cmdlet ignores the Confirm parameter. Specify the Force parameter to perform the action without confirming.

    The release documented in KB 3139245 implements this change. It applies to subsequent releases of Microsoft Application Virtualization 5.1. For more information, see Hotfix Package 2 for Microsoft Application Virtualization 5.1 and Hotfix Package 3 for Microsoft Application Virtualization 5.0 SP3https://support.microsoft.com/en-us/kb/3139245 (https://support.microsoft.com/kb/3139245) in the Microsoft Support Library.