File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2
2
[Parameter ()]
3
3
[String ]$version ,
4
4
[Parameter ()]
5
+ [String ]$zip_dir ,
6
+ [Parameter ()]
5
7
[String ]$observe_collection_endpoint ,
6
8
[Parameter ()]
7
9
[String ]$observe_token
@@ -25,7 +27,13 @@ New-Item -ItemType Directory -Force -Path $observeagent_install_dir\config
25
27
New-Item - ItemType Directory - Force - Path $observeagent_install_dir \connections
26
28
New-Item - ItemType Directory - Force - Path $program_data_filestorage
27
29
28
- Invoke-WebRequest - Uri $installer_url - OutFile $local_installer
30
+ if ($PSBoundParameters.ContainsKey (' zip_dir' )){
31
+ Write-Output " Installing from provided zip file: $zip_dir ..."
32
+ $local_installer = $zip_dir
33
+ } else {
34
+ Write-Output " Downloading observe-agent from $installer_url ..."
35
+ Invoke-WebRequest - Uri $installer_url - OutFile $local_installer
36
+ }
29
37
30
38
# Stop the observe agent if its running so that we can copy the new .exe
31
39
if ((Get-Service ObserveAgent - ErrorAction SilentlyContinue)){
You can’t perform that action at this time.
0 commit comments