<< Back to Script Library

APPV5: Resync with Publishing Server

Simple resynchronization of App-V applications - Equivalent to refreshing the login.
Resynchronisation simple des applications Appv - Equivalent à un refresh au login.
Version: 2.3.4
Created: 2014-06-03
Modified: 2022-10-12
Creator: Tonino Sclavont
Downloads: 191
Tags: Appv sync
The Script Copy Script Copied to clipboard

$ErrorActionPreference = "Stop"

If ( (Get-Module -Name AppvClient -ErrorAction SilentlyContinue) -eq $null )
{
        # using try/catch can stop the script completely if needed with "Exit with error" - 'Exit 1' (or some other non-zero exit code)
        # and avoid a long string of errors because the first statement was not successful.
        Try {
                Import-Module AppvClient
        } Catch {
                Write-Host "There is a problem loading the Powershell module. It is not possible to continue."
                Exit 1
        }
}

Sync-AppvPublishingServer -ServerId 1 -global