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
#Make backup directory | |
$pad = "C:\Temp" | |
$date = Get-Date | |
$date = $date.ToString("dd-MM-yyyy") | |
New-Item -ItemType directory -Path "$Pad\Backup-$date" | |
$backupfolder = "$Pad\Backup-$date" | |
#Create building blocks | |
Start-Process -FilePath "C:\Program Files (x86)\RES Software\Workspace Manager\pwrtech.exe" -ArgumentList "/export $backupfolder\ExportAPPLICATION.XML /type:APPLICATION" -Wait | |
Start-Process -FilePath "C:\Program Files (x86)\RES Software\Workspace Manager\pwrtech.exe" -ArgumentList "/export $backupfolder\ExportAUTOMATIONTASK.XML /type:AUTOMATIONTASK" -Wait |
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
Function Get-RESWMApplications { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$OutputFile, | |
[string]$Inputfile, | |
[switch]$SkipExporat | |
) | |
if(-not($SkipExport)){ | |
Write-Verbose 'Checking if RES WM Management console is running...' |
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 |
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 "Loading App-V Module" | |
Import-Module AppvClient | |
Write-Progress -Activity "Removing App-V Packages" | |
Remove-AppvClientPackage -Name * |
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
$user = Read-Host -Prompt 'Input User name too run the script Example DOMAIN\User' | |
$pass = Read-Host -AsSecureString 'Input Password of user to run the script' | |
$path = Read-Host -Prompt 'Path to script Example C:\Temp' | |
$password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($pass)) | |
$Action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument "$path\Syncing_Staging_App-v_Citrix.ps1" | |
$Trigger = New-ScheduledTaskTrigger -AtStartup -RandomDelay 00:00:30 | |
Register-ScheduledTask -TaskName "App-V Full sync" -action $Action -Trigger $Trigger -RunLevel Highest -User "$user" -Password "$password" |
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
Function fill-roid-group | |
{ | |
Param ( | |
[Parameter(Mandatory)] | |
$Group | |
) | |
Write-Progress -Activity "Loading AD module" | |
Import-Module ActiveDirectory | |