---
title: How to Manage App-V Packages Running on a Stand-Alone Computer by Using Windows PowerShell (Windows 10)
description: How to Manage App-V Packages Running on a Stand-Alone Computer by Using Windows PowerShell
author: MaggiePucciEvans
ms.pagetype: mdop, appcompat, virtualization
ms.mktglfcycl: deploy
ms.sitesec: library
ms.prod: w10
ms.date: 04/19/2017
---
# How to Manage App-V Packages Running on a Stand-Alone Computer by Using Windows PowerShell
**Applies to**
- Windows 10, version 1607
The following sections explain how to perform various management tasks on a stand-alone client computer by using Windows PowerShell:
- [To return a list of packages](#bkmk-return-pkgs-standalone-posh)
- [To add a package](#bkmk-add-pkgs-standalone-posh)
- [To publish a package](#bkmk-pub-pkg-standalone-posh)
- [To publish a package to a specific user](#bkmk-pub-pkg-a-user-standalone-posh)
- [To add and publish a package](#bkmk-add-pub-pkg-standalone-posh)
- [To unpublish an existing package](#bkmk-unpub-pkg-standalone-posh)
- [To unpublish a package for a specific user](#bkmk-unpub-pkg-specfc-use)
- [To remove an existing package](#bkmk-remove-pkg-standalone-posh)
- [To enable only administrators to publish or unpublish packages](#bkmk-admins-pub-pkgs)
- [Understanding pending packages (UserPending and GlobalPending)](#bkmk-understd-pend-pkgs)
## To return a list of packages
Use the following information to return a list of packages that are entitled to a specific user:
**Cmdlet**: Get-AppvClientPackage
**Parameters**: -Name -Version -PackageID -VersionID
**Example**: Get-AppvClientPackage –Name “ContosoApplication” -Version 2
## To add a package
Use the following information to add a package to a computer.
**Important**
This example only adds a package. It does not publish the package to the user or the computer.
**Cmdlet**: Add-AppvClientPackage
**Example**: $Contoso = Add-AppvClientPackage \\\\path\\to\\appv\\package.appv
## To publish a package
Use the following information to publish a package that has been added to a specific user or globally to any user on the computer.
Publishing to the user |
Cmdlet: Publish-AppvClientPackage
Example: Publish-AppvClientPackage “ContosoApplication” |
Publishing globally |
Cmdlet: Publish-AppvClientPackage
Example: Publish-AppvClientPackage “ContosoApplication” -Global |
## To publish a package to a specific user
**Note**
You must use App-V 5.0 SP2 Hotfix Package 5 or later to use this parameter.
An administrator can publish a package to a specific user by specifying the optional **–UserSID** parameter with the **Publish-AppvClientPackage** cmdlet, where **-UserSID** represents the end user’s security identifier (SID).
To use this parameter:
- You can run this cmdlet from the user or administrator session.
- You must be logged in with administrative credentials to use the parameter.
- The end user must be logged in.
- You must provide the end user’s security identifier (SID).
**Cmdlet**: Publish-AppvClientPackage
**Example**: Publish-AppvClientPackage “ContosoApplication” -UserSID S-1-2-34-56789012-3456789012-345678901-2345
## To add and publish a package
Use the following information to add a package to a computer and publish it to the user.
**Cmdlet**: Add-AppvClientPackage
**Example**: Add-AppvClientPackage \\\\path\\to\\appv\\package.appv | Publish-AppvClientPackage
## To unpublish an existing package
Use the following information to unpublish a package which has been entitled to a user but not remove the package from the computer.
**Cmdlet**: Unpublish-AppvClientPackage
**Example**: Unpublish-AppvClientPackage “ContosoApplication”
## To unpublish a package for a specific user
**Note**
You must use App-V 5.0 SP2 Hotfix Package 5 or later to use this parameter.
An administrator can unpublish a package for a specific user by using the optional **–UserSID** parameter with the **Unpublish-AppvClientPackage** cmdlet, where **-UserSID** represents the end user’s security identifier (SID).
To use this parameter:
- You can run this cmdlet from the user or administrator session.
- You must be logged in with administrative credentials to use the parameter.
- The end user must be logged in.
- You must provide the end user’s security identifier (SID).
**Cmdlet**: Unpublish-AppvClientPackage
**Example**: Unpublish-AppvClientPackage “ContosoApplication” -UserSID S-1-2-34-56789012-3456789012-345678901-2345
## To remove an existing package
Use the following information to remove a package from the computer.
**Cmdlet**: Remove-AppvClientPackage
**Example**: Remove-AppvClientPackage “ContosoApplication”
**Note**
App-V cmdlets have been assigned to variables for the previous examples for clarity only; assignment is not a requirement. Most cmdlets can be combined as displayed in [To add and publish a package](#bkmk-add-pub-pkg-standalone-posh). For a detailed tutorial, see [App-V 5.0 Client PowerShell Deep Dive](https://blogs.technet.microsoft.com/appv/2012/12/03/app-v-5-0-client-powershell-deep-dive/).
## To enable only administrators to publish or unpublish packages
Starting in App-V 5.0 SP3, you can use the following cmdlet and parameter to enable only administrators (not end users) to publish or unpublish packages:
Cmdlet |
Set-AppvClientConfiguration |
Parameter |
-RequirePublishAsAdmin
Parameter values:
Example:: Set-AppvClientConfiguration –RequirePublishAsAdmin1 |
To use the App-V Management console to set this configuration, see [How to Publish a Package by Using the Management Console](appv-publish-a-packages-with-the-management-console.md).
## Understanding pending packages (UserPending and GlobalPending)
**Starting in App-V 5.0 SP2**: If you run a Windows PowerShell cmdlet that affects a package that is currently in use, the task that you are trying to perform is placed in a pending state. For example, if you try to publish a package when an application in that package is being used, and then run **Get-AppvClientPackage**, the pending status appears in the cmdlet output as follows:
UserPending |
Indicates whether the listed package has a pending task that is being applied to the user:
|
GlobalPending |
Indicates whether the listed package has a pending task that is being applied globally to the computer:
|
The pending task will run later, according to the following rules:
User-based task, e.g., publishing a package to a user |
The pending task will be performed after the user logs off and then logs back on. |
Globally based task, e.g., enabling a connection group globally |
The pending task will be performed when the computer is shut down and then restarted. |
For more information about pending tasks, see [Upgrading an in-use App-V package](appv-application-publishing-and-client-interaction.md#upgrading-an-in-use-app-v-package).
## Have a suggestion for App-V?
Add or vote on suggestions on the [Application Virtualization feedback site](https://appv.uservoice.com/forums/280448-microsoft-application-virtualization).
For App-V issues, use the [App-V TechNet Forum](https://social.technet.microsoft.com/Forums/en-US/home?forum=mdopappv).
## Related topics
[Operations for App-V](appv-operations.md)
[Administering App-V by Using Windows PowerShell](appv-administering-appv-with-powershell.md)