From 80d780c7d3d007e8bf8e556410d239ff2e3e605f Mon Sep 17 00:00:00 2001 From: zachaugenfeld Date: Sat, 21 Dec 2024 17:49:03 -0500 Subject: [PATCH 1/7] added powershell script install info --- docs/app/agents/DebuggingAgents.mdx | 108 ++++++++++++++++++++++++---- 1 file changed, 96 insertions(+), 12 deletions(-) diff --git a/docs/app/agents/DebuggingAgents.mdx b/docs/app/agents/DebuggingAgents.mdx index 937621c8..65e372c1 100644 --- a/docs/app/agents/DebuggingAgents.mdx +++ b/docs/app/agents/DebuggingAgents.mdx @@ -60,8 +60,7 @@ The following files are needed: - inferredData (any) - startTime - Version - -A Windows batch script, such as the one shown below, saved to a .bat file: +- A Windows batch script, such as the one shown below, saved to a .bat file: ```shell @ECHO OFF @@ -103,17 +102,17 @@ An example for the configuration file (YAML) used with headless install is shown ```yaml environment: env-prod tagParams: -- displayValue: Microlab STAR 1 - tagId: null - tagTypeId: instrument - url: null -- displayValue: Hamilton - tagId: null - tagTypeId: vendor - url: null + - displayValue: Microlab STAR 1 + tagId: null + tagTypeId: instrument + url: null + - displayValue: Hamilton + tagId: null + tagTypeId: vendor + url: null ``` -##### Execution steps +##### Execution Steps 1. Rename agent installer “agent.exe” 1. Name configuration file “connection.yaml” (if it has a different name) @@ -136,6 +135,92 @@ Once set, invoke the task using `schtasks`: schtasks /run /tn "TaskName" ``` +#### Q: Can Windows Agents be installed via a Powershell script? + +A: Yes - Agent installers (v4.10+) can be installed via a Powershell script. + +##### Requirements + +- Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 +- A Powershell script (.ps1 file), such as the one shown below: + +```powershell +param ( + [string]$environment, + [string]$connectionName, + [array]$tagParams, + [string]$installPath +) + +# Get install path or use default +if ($installPath -eq '') { + $installPath = "C:\Program Files\Ganymede" +} +Write-Output "Will install to $installPath" + +# Get connection name or use computer name as default +if ($connectionName -eq '') { + $connectionName = $env:COMPUTERNAME +} +Write-Output "Connection will be named $connectionName" + +# Define the content of the YAML file +$content = @" +environment: $environment +name: $connectionName +tagParams:`n +"@ + +foreach ($tag in $tagParams) { + $content += " - tagTypeId: $($tag.tagTypeId)`n displayValue: $($tag.displayValue)`n" +} + +# Save the content to connection.yaml in the same folder +$filePath = Join-Path -Path $PSScriptRoot -ChildPath "connection.yaml" +$content | Out-File -FilePath $filePath -Encoding utf8 +Write-Output "File 'connection.yaml' created successfully at $filePath" + +# Create the install directory if it doesn't exist +New-Item -Path $installPath -Type "directory" -Force >$null + +# Copy the connection.yaml to the install directory +Copy-Item -Path $PSScriptRoot\connection.yaml -Destination $installPath -Force +Write-Output "File 'connection.yaml' copied to $installPath" + +# Copy the agent exe to the install directory +$agentFileName = Get-ChildItem -Path $PSScriptRoot -Filter *.exe |Select -First 1 +Copy-Item -Path $PSScriptRoot\$agentFileName -Destination $installPath -Force +Write-Output "File $agentFileName copied to $installPath" + +# Run agent.exe and wait for it to finish +$agentInstallerPath = Join-Path -Path $installPath -ChildPath $agentFileName +Start-Process -FilePath $agentInstallerPath -Wait + +Write-Output "$agentFileName has finished running" +``` + +##### Execution Steps + +1. Ensure PowerShell is installed on your system. +1. Ensure the agent executable (.exe) and script file (.ps1) are in the same directory. +1. From a Powershell terminal, navigate to this directory. +1. Run the script using the following command: + +```powershell +.\.ps1 -environment -connectionName -tagParams -installPath +``` + +- Parameters are defined as follows: + - **-environment** (string, required): Specifies the full environment name to install the agent in (e.g., development, staging, production). + - **-tagParams** (array, required): An array of tags to include in the YAML file. Each tag should be an object with tagTypeId and displayValue properties. + - **-connectionName** (string, optional): Sets the name for the connection. Defaults to the computer name if not provided. + - **-installPath** (string, optional): Path to the installation directory. Defaults to C:\Program Files\Ganymede if not specified. +- Example: + +```powershell +.\agent_installer_script.ps1 -environment "env-prod" -connectionName "Hamilton PC 6" -tagParams @(@{tagTypeId="instrument"; displayValue="H6"}, @{tagTypeId="site"; displayValue="New York"}) -installPath "C:\Install\Agent\Here" +``` + #### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? A: No, there are no command-line scripts that need to execute for the Windows Agent. @@ -264,4 +349,3 @@ sc delete GanymedeAgent- ``` where _agent_name_ is the name of the Agent Connection. - From 2880329dbc5300b382fead328ac629d7f0138635 Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:15:50 -0800 Subject: [PATCH 2/7] spellcheck --- .wordlist.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.wordlist.txt b/.wordlist.txt index a40e2d5c..83749f34 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -409,4 +409,8 @@ GPT walkthroughs PlateReader QuickstartBuildFlow -DashboardTips \ No newline at end of file +DashboardTips +displayValue +tagTypeId +connectionName +installPath From 5286c8fd34370614e99442dbbdaa1d126d00d225 Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:17:37 -0800 Subject: [PATCH 3/7] upd --- sidebars.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index 708d9f6a..337f2b58 100644 --- a/sidebars.js +++ b/sidebars.js @@ -70,7 +70,12 @@ module.exports = { id: 'app/flows/NotebookTips', label: 'Notebook Tips and Tricks' }, - 'app/flows/TroubleshootingFlows' + { + type: 'doc', + id: 'app/flows/TroubleshootingFlows', + label: 'Agent FAQ and Troubleshooting' + } + ], }, { From e10564acb89e9bd0de12526e115f229d4af4c5af Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:22:54 -0800 Subject: [PATCH 4/7] upd --- sidebars.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sidebars.js b/sidebars.js index 337f2b58..9435cd4e 100644 --- a/sidebars.js +++ b/sidebars.js @@ -70,12 +70,7 @@ module.exports = { id: 'app/flows/NotebookTips', label: 'Notebook Tips and Tricks' }, - { - type: 'doc', - id: 'app/flows/TroubleshootingFlows', - label: 'Agent FAQ and Troubleshooting' - } - + 'app/flows/TroubleshootingFlows' ], }, { @@ -148,7 +143,7 @@ module.exports = { { type: 'doc', id: 'app/agents/DebuggingAgents', - label: 'Troubleshooting Agents & FAQ' + label: 'Agent FAQ and Troubleshooting' }, { type: 'doc', From 5c0f1a4e851ed50345f7d7b8860bfe504c2e4e5a Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:35:19 -0800 Subject: [PATCH 5/7] upd --- docs/app/agents/DebuggingAgents.mdx | 183 ++++++++++++++-------------- 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/docs/app/agents/DebuggingAgents.mdx b/docs/app/agents/DebuggingAgents.mdx index 65e372c1..21f2078c 100644 --- a/docs/app/agents/DebuggingAgents.mdx +++ b/docs/app/agents/DebuggingAgents.mdx @@ -2,6 +2,7 @@ id: DebuggingAgents title: Agent FAQ and Troubleshooting displayed_sidebar: webUiSidebar +toc_max_heading_level: 5 --- ## FAQ @@ -42,11 +43,97 @@ watch_directory = Path(kwargs.get("vars", {}).get("input_path", DEFAULT_PATH)) #### Q: Can Windows Agents be installed headlessly? -A: Yes - Agent installers (v4.10+) can be installed headlessly. +A: Yes - Agent installers (v4.10+) can be installed headlessly, either with a [Powershell script](#using-a-powershell-script) or a [Windows batch script](#using-a-batch-script). -##### Requirements +##### Using a Powershell Script -The following files are needed: +###### Prerequisites + +- Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 +- A Powershell script (.ps1 file), such as the one shown below: + +```powershell +param ( + [string]$environment, + [string]$connectionName, + [array]$tagParams, + [string]$installPath +) + +# Get install path or use default +if ($installPath -eq '') { + $installPath = "C:\Program Files\Ganymede" +} +Write-Output "Will install to $installPath" + +# Get Connection name, or use computer name as default +if ($connectionName -eq '') { + $connectionName = $env:COMPUTERNAME +} +Write-Output "Connection will be named $connectionName" + +# Define the content of the YAML file +$content = @" +environment: $environment +name: $connectionName +tagParams:`n +"@ + +# Add Tag configuration to Connection +foreach ($tag in $tagParams) { + $content += " - tagTypeId: $($tag.tagTypeId)`n displayValue: $($tag.displayValue)`n" +} + +# Save the content to connection.yaml in the same folder +$filePath = Join-Path -Path $PSScriptRoot -ChildPath "connection.yaml" +$content | Out-File -FilePath $filePath -Encoding utf8 +Write-Output "File 'connection.yaml' created successfully at $filePath" + +# Create the install directory if it doesn't exist +New-Item -Path $installPath -Type "directory" -Force >$null + +# Copy the connection.yaml to the install directory +Copy-Item -Path $PSScriptRoot\connection.yaml -Destination $installPath -Force +Write-Output "File 'connection.yaml' copied to $installPath" + +# Copy the Agent installation executable (agent.exe) to the install directory +$agentFileName = Get-ChildItem -Path $PSScriptRoot -Filter *.exe |Select -First 1 +Copy-Item -Path $PSScriptRoot\$agentFileName -Destination $installPath -Force +Write-Output "File $agentFileName copied to $installPath" + +# Run agent.exe and wait for it to finish +$agentInstallerPath = Join-Path -Path $installPath -ChildPath $agentFileName +Start-Process -FilePath $agentInstallerPath -Wait + +Write-Output "$agentFileName has finished running" +``` + +###### Steps for executing headless installation script + +1. Ensure PowerShell is installed on your system. +1. Ensure the agent executable (.exe) and script file (.ps1) are in the same directory. +1. From a Powershell terminal, navigate to this directory. +1. Run the script using the following command: + +```powershell +.\.ps1 -environment -connectionName -tagParams -installPath +``` + +Parameters are defined as follows: +- **-environment** (string, required): Specifies the full environment name to install the agent in (e.g., development, staging, production). +- **-tagParams** (array, required): An array of tags to include in the YAML file. Each tag should be an object with tagTypeId and displayValue properties. +- **-connectionName** (string, optional): Sets the name for the connection. Defaults to the computer name if not provided. +- **-installPath** (string, optional): Path to the installation directory. Defaults to C:\Program Files\Ganymede if not specified. + +###### Example + +```powershell +.\agent_installer_script.ps1 -environment "env-prod" -connectionName "Hamilton PC 6" -tagParams @(@{tagTypeId="instrument"; displayValue="H6"}, @{tagTypeId="site"; displayValue="New York"}) -installPath "C:\Install\Agent\Here" +``` + +##### Using a Batch Script + +###### Prerequisites - Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 - Configuration file (YAML); examples of this can be found in the directory specified by the installer when not installed headlessly. Start with an existing YAML configuration and modify as follows: @@ -86,7 +173,7 @@ copy "%~dp0agent.exe" "%installpath%" /v /y ECHO Step 3: Adding user-provided variables to config file echo name: %connectionname%>>"%~dp0connection.yaml" echo variables:>>"%~dp0connection.yaml" -echo input_path: %watchdir%>>"%~dp0connection.yaml" +echo input_path: %watchdir%>>"%~dp0connection.yaml" ECHO Step 4: Copying config file copy "%~dp0connection.yaml" "%installpath%" /v /y @@ -112,7 +199,7 @@ tagParams: url: null ``` -##### Execution Steps +###### Execution Steps 1. Rename agent installer “agent.exe” 1. Name configuration file “connection.yaml” (if it has a different name) @@ -135,92 +222,6 @@ Once set, invoke the task using `schtasks`: schtasks /run /tn "TaskName" ``` -#### Q: Can Windows Agents be installed via a Powershell script? - -A: Yes - Agent installers (v4.10+) can be installed via a Powershell script. - -##### Requirements - -- Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 -- A Powershell script (.ps1 file), such as the one shown below: - -```powershell -param ( - [string]$environment, - [string]$connectionName, - [array]$tagParams, - [string]$installPath -) - -# Get install path or use default -if ($installPath -eq '') { - $installPath = "C:\Program Files\Ganymede" -} -Write-Output "Will install to $installPath" - -# Get connection name or use computer name as default -if ($connectionName -eq '') { - $connectionName = $env:COMPUTERNAME -} -Write-Output "Connection will be named $connectionName" - -# Define the content of the YAML file -$content = @" -environment: $environment -name: $connectionName -tagParams:`n -"@ - -foreach ($tag in $tagParams) { - $content += " - tagTypeId: $($tag.tagTypeId)`n displayValue: $($tag.displayValue)`n" -} - -# Save the content to connection.yaml in the same folder -$filePath = Join-Path -Path $PSScriptRoot -ChildPath "connection.yaml" -$content | Out-File -FilePath $filePath -Encoding utf8 -Write-Output "File 'connection.yaml' created successfully at $filePath" - -# Create the install directory if it doesn't exist -New-Item -Path $installPath -Type "directory" -Force >$null - -# Copy the connection.yaml to the install directory -Copy-Item -Path $PSScriptRoot\connection.yaml -Destination $installPath -Force -Write-Output "File 'connection.yaml' copied to $installPath" - -# Copy the agent exe to the install directory -$agentFileName = Get-ChildItem -Path $PSScriptRoot -Filter *.exe |Select -First 1 -Copy-Item -Path $PSScriptRoot\$agentFileName -Destination $installPath -Force -Write-Output "File $agentFileName copied to $installPath" - -# Run agent.exe and wait for it to finish -$agentInstallerPath = Join-Path -Path $installPath -ChildPath $agentFileName -Start-Process -FilePath $agentInstallerPath -Wait - -Write-Output "$agentFileName has finished running" -``` - -##### Execution Steps - -1. Ensure PowerShell is installed on your system. -1. Ensure the agent executable (.exe) and script file (.ps1) are in the same directory. -1. From a Powershell terminal, navigate to this directory. -1. Run the script using the following command: - -```powershell -.\.ps1 -environment -connectionName -tagParams -installPath -``` - -- Parameters are defined as follows: - - **-environment** (string, required): Specifies the full environment name to install the agent in (e.g., development, staging, production). - - **-tagParams** (array, required): An array of tags to include in the YAML file. Each tag should be an object with tagTypeId and displayValue properties. - - **-connectionName** (string, optional): Sets the name for the connection. Defaults to the computer name if not provided. - - **-installPath** (string, optional): Path to the installation directory. Defaults to C:\Program Files\Ganymede if not specified. -- Example: - -```powershell -.\agent_installer_script.ps1 -environment "env-prod" -connectionName "Hamilton PC 6" -tagParams @(@{tagTypeId="instrument"; displayValue="H6"}, @{tagTypeId="site"; displayValue="New York"}) -installPath "C:\Install\Agent\Here" -``` - #### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? A: No, there are no command-line scripts that need to execute for the Windows Agent. From 7e406c3741b1691b6b3088359d840d166a4add5c Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:37:35 -0800 Subject: [PATCH 6/7] upd --- docs/app/agents/DebuggingAgents.mdx | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/app/agents/DebuggingAgents.mdx b/docs/app/agents/DebuggingAgents.mdx index 21f2078c..e172a5d5 100644 --- a/docs/app/agents/DebuggingAgents.mdx +++ b/docs/app/agents/DebuggingAgents.mdx @@ -2,12 +2,12 @@ id: DebuggingAgents title: Agent FAQ and Troubleshooting displayed_sidebar: webUiSidebar -toc_max_heading_level: 5 +toc_max_heading_level: 4 --- ## FAQ -#### Q: How do I exclude specific files from a watch folder from being uploaded for an agent that uploads files and runs flows? +### Q: How do I exclude specific files from a watch folder from being uploaded for an agent that uploads files and runs flows? A: To exclude specific files from being uploaded, you can use the `fp` function to specify which files should be included. For example, to exclude files that contain the string "exclude" in the filename, you can use the following code: @@ -23,15 +23,15 @@ def fp_res(x: str): return fp_res ``` -#### Q: How do I capture a file that is periodically overwritten by an instrument? +### Q: How do I capture a file that is periodically overwritten by an instrument? A: File watcher Agents automatically capture modified files, which they then upload for processing in flows. You can implement logic within the flow or agent to handle the intended behavior, depending on whether the instrument appends to or overwrites the file. -#### Q: Can I access environment secrets from the Agent? +### Q: Can I access environment secrets from the Agent? A: Yes, environment secrets can be accessed from the Agent by using the [get_secret](../../sdk/GanymedeClass#method-get_secret) method. -#### Q: Can I access an environment variable from a cron Agent? For example, can I access the `input_path` variable configured upon installation? +### Q: Can I access an environment variable from a cron Agent? For example, can I access the `input_path` variable configured upon installation? A: Yes, environment variables can be accessed from a cron Agent through the `kwargs` dictionary. For example, to access the `input_path` variable, you can use the following code: @@ -41,13 +41,13 @@ A: Yes, environment variables can be accessed from a cron Agent through the `kwa watch_directory = Path(kwargs.get("vars", {}).get("input_path", DEFAULT_PATH)) ``` -#### Q: Can Windows Agents be installed headlessly? +### Q: Can Windows Agents be installed headlessly? A: Yes - Agent installers (v4.10+) can be installed headlessly, either with a [Powershell script](#using-a-powershell-script) or a [Windows batch script](#using-a-batch-script). -##### Using a Powershell Script +#### Using a Powershell Script -###### Prerequisites +##### Prerequisites - Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 - A Powershell script (.ps1 file), such as the one shown below: @@ -108,7 +108,7 @@ Start-Process -FilePath $agentInstallerPath -Wait Write-Output "$agentFileName has finished running" ``` -###### Steps for executing headless installation script +##### Steps for executing headless installation script 1. Ensure PowerShell is installed on your system. 1. Ensure the agent executable (.exe) and script file (.ps1) are in the same directory. @@ -125,15 +125,15 @@ Parameters are defined as follows: - **-connectionName** (string, optional): Sets the name for the connection. Defaults to the computer name if not provided. - **-installPath** (string, optional): Path to the installation directory. Defaults to C:\Program Files\Ganymede if not specified. -###### Example +##### Example ```powershell .\agent_installer_script.ps1 -environment "env-prod" -connectionName "Hamilton PC 6" -tagParams @(@{tagTypeId="instrument"; displayValue="H6"}, @{tagTypeId="site"; displayValue="New York"}) -installPath "C:\Install\Agent\Here" ``` -##### Using a Batch Script +#### Using a Batch Script -###### Prerequisites +##### Prerequisites - Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 - Configuration file (YAML); examples of this can be found in the directory specified by the installer when not installed headlessly. Start with an existing YAML configuration and modify as follows: @@ -199,7 +199,7 @@ tagParams: url: null ``` -###### Execution Steps +##### Steps for executing headless installation script 1. Rename agent installer “agent.exe” 1. Name configuration file “connection.yaml” (if it has a different name) @@ -222,11 +222,11 @@ Once set, invoke the task using `schtasks`: schtasks /run /tn "TaskName" ``` -#### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? +### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? A: No, there are no command-line scripts that need to execute for the Windows Agent. -#### Q: Are there any known application dependencies or pre-requisites for the Windows Agent (e.g. - .NET, KBs, Redist)? +### Q: Are there any known application dependencies or pre-requisites for the Windows Agent (e.g. - .NET, KBs, Redist)? A: No, the full set of Agent requirements can be found on the [Agent System Requirements page](../configuration/AgentSystemRequirements.mdx). From ac1b91c8aaf77e2bc0fea70d0f2de66041776d29 Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Sun, 22 Dec 2024 07:40:52 -0800 Subject: [PATCH 7/7] upd --- docs/app/agents/DebuggingAgents.mdx | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/app/agents/DebuggingAgents.mdx b/docs/app/agents/DebuggingAgents.mdx index e172a5d5..28a6ee70 100644 --- a/docs/app/agents/DebuggingAgents.mdx +++ b/docs/app/agents/DebuggingAgents.mdx @@ -2,12 +2,12 @@ id: DebuggingAgents title: Agent FAQ and Troubleshooting displayed_sidebar: webUiSidebar -toc_max_heading_level: 4 +toc_max_heading_level: 5 --- ## FAQ -### Q: How do I exclude specific files from a watch folder from being uploaded for an agent that uploads files and runs flows? +#### Q: How do I exclude specific files from a watch folder from being uploaded for an agent that uploads files and runs flows? A: To exclude specific files from being uploaded, you can use the `fp` function to specify which files should be included. For example, to exclude files that contain the string "exclude" in the filename, you can use the following code: @@ -23,15 +23,15 @@ def fp_res(x: str): return fp_res ``` -### Q: How do I capture a file that is periodically overwritten by an instrument? +#### Q: How do I capture a file that is periodically overwritten by an instrument? A: File watcher Agents automatically capture modified files, which they then upload for processing in flows. You can implement logic within the flow or agent to handle the intended behavior, depending on whether the instrument appends to or overwrites the file. -### Q: Can I access environment secrets from the Agent? +#### Q: Can I access environment secrets from the Agent? A: Yes, environment secrets can be accessed from the Agent by using the [get_secret](../../sdk/GanymedeClass#method-get_secret) method. -### Q: Can I access an environment variable from a cron Agent? For example, can I access the `input_path` variable configured upon installation? +#### Q: Can I access an environment variable from a cron Agent? For example, can I access the `input_path` variable configured upon installation? A: Yes, environment variables can be accessed from a cron Agent through the `kwargs` dictionary. For example, to access the `input_path` variable, you can use the following code: @@ -41,13 +41,13 @@ A: Yes, environment variables can be accessed from a cron Agent through the `kwa watch_directory = Path(kwargs.get("vars", {}).get("input_path", DEFAULT_PATH)) ``` -### Q: Can Windows Agents be installed headlessly? +#### Q: Can Windows Agents be installed headlessly? A: Yes - Agent installers (v4.10+) can be installed headlessly, either with a [Powershell script](#using-a-powershell-script) or a [Windows batch script](#using-a-batch-script). -#### Using a Powershell Script +##### Using a Powershell Script -##### Prerequisites +###### Prerequisites - Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 - A Powershell script (.ps1 file), such as the one shown below: @@ -108,7 +108,7 @@ Start-Process -FilePath $agentInstallerPath -Wait Write-Output "$agentFileName has finished running" ``` -##### Steps for executing headless installation script +###### Steps for executing headless installation script 1. Ensure PowerShell is installed on your system. 1. Ensure the agent executable (.exe) and script file (.ps1) are in the same directory. @@ -125,15 +125,15 @@ Parameters are defined as follows: - **-connectionName** (string, optional): Sets the name for the connection. Defaults to the computer name if not provided. - **-installPath** (string, optional): Path to the installation directory. Defaults to C:\Program Files\Ganymede if not specified. -##### Example +###### Example ```powershell .\agent_installer_script.ps1 -environment "env-prod" -connectionName "Hamilton PC 6" -tagParams @(@{tagTypeId="instrument"; displayValue="H6"}, @{tagTypeId="site"; displayValue="New York"}) -installPath "C:\Install\Agent\Here" ``` -#### Using a Batch Script +##### Using a Batch Script -##### Prerequisites +###### Prerequisites - Agent installer (EXE, not MSI) with a minimum core Agent version of 4.10 - Configuration file (YAML); examples of this can be found in the directory specified by the installer when not installed headlessly. Start with an existing YAML configuration and modify as follows: @@ -199,7 +199,7 @@ tagParams: url: null ``` -##### Steps for executing headless installation script +###### Steps for executing headless installation script 1. Rename agent installer “agent.exe” 1. Name configuration file “connection.yaml” (if it has a different name) @@ -222,11 +222,11 @@ Once set, invoke the task using `schtasks`: schtasks /run /tn "TaskName" ``` -### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? +#### Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work? A: No, there are no command-line scripts that need to execute for the Windows Agent. -### Q: Are there any known application dependencies or pre-requisites for the Windows Agent (e.g. - .NET, KBs, Redist)? +#### Q: Are there any known application dependencies or pre-requisites for the Windows Agent (e.g. - .NET, KBs, Redist)? A: No, the full set of Agent requirements can be found on the [Agent System Requirements page](../configuration/AgentSystemRequirements.mdx).