Created
April 22, 2017 11:08
-
-
Save Christwiest/2fc151c1b4fdd0e4cebc68db8f7a06b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Progress -Activity "Stop VDA Agent" | |
Stop-Service BrokerAgent -Force | |
Import-Module AppvClient | |
Write-Progress -Activity "Sync Packages" | |
Sync-AppvPublishingServer 1 -Global | |
Write-Progress -Activity "App-v Staging Registry" | |
$apps = Get-AppvClientPackage | |
[System.Collections.ArrayList]$appList = $apps | |
foreach ($app in $apps){ | |
$package = ($app.packageID).ToString() | |
$version = ($app.versionID).ToString() | |
Start-AppvVirtualProcess -AppvClientObject (Get-AppvClientPackage $app.name) cmd.exe | |
$command = measure-command { | |
do { | |
write-host "Staging: " $app.name | |
sleep 1 | |
} | |
until (Test-Path "HKLM:\SOFTWARE\Microsoft\AppV\Client\Packages\$package\Versions\$version\RegistryStagingFinished") | |
write-host "Finished: " $app.name | |
$appvProcess = get-appvVirtualProcess | |
Stop-appvclientpackage $app | |
}} | |
Write-Progress -Activity "Start VDA Agent" | |
Start-Service BrokerAgent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment