document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. $ErrorActionPreference = "Stop"
  2. $string = select-string -Pattern "$WriteCacheType=4" -path C:\\Personality.ini -quiet
  3. $hostname = hostname
  4.  
  5. If ($string -ne "True")
  6. {
  7. Break
  8. }
  9.  
  10. # Add and Publish
  11. Add-AppVClientPackage -path '\\\\yourapplication.appv' | Publish-AppVClientPackage -global
  12.  
  13. # Connection Groups
  14. Add-AppVClientConnectionGroup -path '\\\\yourconnectiongroup.xml' | Enable-AppVClientConnectionGroup -global
  15.  
  16. # Excluded Connection Groups
  17.  
  18. #Create Successful Publish Flag
  19. $Location = "C:\\ProgramData\\App-V"
  20. New-Item -path $Location -name "Packages.Published" -type File
');