# Install or remove the CI-Eng-Sample live-data feed (CI Server R1.03.00). # Copies cieng_feed.ps1 and cieng_feed_start.cmd to C:\Users\Public\CI-Eng-Sample\feed: a fixed folder # outside the CI Server installation (the feed is not part of the CI Server package) that the CI # Server service account can read. The display button "Start" calls the .cmd there. # No admin rights needed. Usage: powershell -ExecutionPolicy Bypass -File install_feed.ps1 [-Remove] param([switch]$Remove) $dest = 'C:\Users\Public\CI-Eng-Sample\feed' if ($Remove) { if (Test-Path $dest) { Remove-Item -LiteralPath $dest -Recurse -Force } $parent = Split-Path $dest if ((Test-Path $parent) -and -not (Get-ChildItem -LiteralPath $parent -Force)) { Remove-Item -LiteralPath $parent -Force } 'Feed removed from ' + $dest return } New-Item -ItemType Directory -Force -Path $dest > $null Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'cieng_feed.ps1') -Destination $dest -Force Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'cieng_feed_start.cmd') -Destination $dest -Force 'Feed installed in ' + $dest