I have now moved this article to the AppDetails forum, this will enable me to support the script.
Please follow this link for the article and script.




In a hurry and just want the script, click here (link disabled, see above)

Be the lazy admin you want to be and use this script to publish to User SID's for testing.

Quick Guide
  1. Login as target user you would like the App-V packaged to be published too. 
  2. Start a elevated powershell console, switch directories to the location of the App-V package and run the "AddAndPublish-AppvClientPackageToSID.ps1" script.
  3. When the script runs, you will be prompted to select a target user.
Sit back and relax knowing that I saved you a fiddly five minutes getting that stupid User SID and typing that long PowerShell command to Publish the package to a User SID.

Here is a greenshot of it in action. Note the logged in user, the PowerShell context and menu selection for targeting. Sorry about the crappy screenshot, ITNinja downgrading it.
thV26s.png

Things to note.
  • The user must be logged on!
  • Works with multiple App-V packages with or without UserConfig XML's.
    Will only work with a single App-V package in the directory - not coded for multiple yet.
  • Works with local, domain and switched users.
  • Should work with Terminal Services

The disclaimer:
Not my fault if it blows up your computer, or turns you into a zombie.



Edit Log

11/11/2016: Initial release.

18/11/2016: FIXED: Bug, even though a user has logged off its still counted as a Active Session. Will fix this soon.

23/12/2016: Updated script with a better function to detect active sessions, added support for multiple packages.