Skip to content

Windows agent install ps1 script - "Write-Info" unknown #709

@Dergonic

Description

@Dergonic

Describe the bug
Running the command with powershell made the windows close without displaying anything and not installing.
I then did diagnose a bit further and did step by step

  • added both env vars
  • ran "powershell -executionpolicy bypass -file .\install-host-agent.ps1"

I then faced this error message

Write-Info : The term 'Write-Info' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\install-host-agent.ps1:126 char:1
+ Write-Info "Configuration:"
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Write-Info:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

Temporary solution, I changed all "Write-Info" to "Write-Host" and the script managed to install the agent and it is now working

To Reproduce
Exact steps I did so you can reproduce :

  1. I Downloaded "http://pulse.domus.lan/install-host-agent.ps1" (I saved it in my D: drive, no subfolder, but whatever)
  2. I Opened powershell asadministrator
  3. Execute command "cd d:"
  4. Execute command "$env:PULSE_URL="http://pulse.domus.lan""
  5. Execute command "$env:PULSE_TOKEN="****""
  6. Execute command "powershell -executionpolicy bypass -file .\install-host-agent.ps1"

Expected behavior
Should have run normally

Environment:

  • Pulse Version: v4.29.0
  • Installation Type: Docker
  • Windows Host :
Image

Additional context
Add any other context, screenshots, or logs here.

Please note there are also addition characters not interpreted well
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions