Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows deployment of the BeaKer agent over a PS remote session as follows:
Invoke-Command -ComputerName (Get-Content .\systems.txt) -FilePath .\install-sysmon-beats.ps1 -ArgumentList "ip.of.BeaKer", "9200", $cred
systems.txt is a text file with the ips of each system the agent should be installed on, each on a new line.
$cred is a powershell credential object and can be defined with $cred = (Get-Credential)
If the agent is being installed locally, a credential object can be passed as an argument or the script will ask if none is provided. Passing the username/pass in plain text as arguments doesn't work with this change.
To whoever tests this out, shoot me an email (dave) if you need help setting up a windows environment that allows PS remoting. I suspect most real-life customers will already have it enabled in some way or another.