r/MeshCentral•
hellofaduck

How to automate installation of MeshAgents with GPO?

How to automate installation of MeshAgents with GPO?

I can't use exe files, and when i converting exe to msi with -fullinstall and -resetenodeid keys it dont working.
How all you doing this in AD environment? Please dont say that you use startup scripts and other redneck automation :(((

P.S. Great tool, thanks to all contributors that involved in this project!

Posted Apr 21, 2020, 1:32 PM UTC

514
shinkamui•

System Center. We don't use poor man automation in my shop.

4
bad_fake_name•

That's awful fuckin hoity-toity of you considering this is a sub for a poor man's logmein.

1
shinkamui•

Maybe you didn't read his post? I was responding directly to "Please dont say that you use startup scripts and other redneck automation :(((". I was pretty sure it was all jokery between myself and the OP, not sure how or why you took offense.

3
bad_fake_name•

I use a pretty straight forward batch script:

IF NOT EXIST "%ProgramFiles%\Mesh Agent\MeshAgent.exe" (
"\\server\deploy\MeshCentral\meshagent.exe" -fullinstall
)
4
hellofaduckOP•

yesterday i wrote exactly this bat file for testing puproses :))

And another question is commandline key "-resetnodeid" is mandatory for massive automated deployment or not?

2
NotAnNSASpySatellite•

Very good question, I wonder if you could leverage a PowerShell script that calls the installer from a network location with the flags.

3
NotAnNSASpySatellite•

Just to add to this, I tried this on a few test machines and I was successful.

​

Import-Module BitsTransfer

$mynetworklocation = "\\my\network\location\meshagent64.exe"
$mylocallocation = "C:\temp"

New-Item $mylocallocation -Force -ItemType Directory -ErrorAction SilentlyContinue
Start-BitsTransfer -Source $mynetworklocation -Destination $mylocallocation
Start-Process C:\temp\meshagent64.exe -Wait -ArgumentList '-fullinstall -resetenodeid'
Remove-Item -LiteralPath C:\temp\meshagent64.exe -force
Restart-Service -Name "Mesh Agent"
exit
3
ylianst•

That is a really good question, I am not familiar with Group Policy Object (GPO) to answer this, but if someone knows, I would like to add it to MeshCentral documentation.

3
hellofaduckOP•

I am familiar with GPO, and there is a 2 ways: 1-msi files(not exe or another executable) or 2- make startup\shutdown script with bat or powershell script. Different way is SCCM but this is another story,and it not free at all 😀😀

2
hellofaduckOP•

And one more question! How can i setup meshcentral to work on 2 addresses: LAN IP and second WAN IP. So i can connect to local and remote users from 1 server, is agent can try to connect to not only 1 address? Or architectually its limited to 1 address that we print in our certificates? And if that true if this sheme would work?

LAN --> LAN DNS (www.contoso.com = 10.10.5.5) --> SERVER <--WAN <-- WAN DNS (www.contoso.com=WAN IP)

2
NotAnNSASpySatellite•

You're looking for Hybrid mode, take a look at the install guide http://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2InstallGuide.pdf server mode Hybrid is what you want. I am doing Hybrid with LAN and WAN, even though mine is deployed in Digital Ocean, but it is associated with a DNS entry as my AD domain is ad.domain.tld which frees up using <something>.domain.tld such as meshcentral.domain.tld and it route properly...not sure what your situation is, but I believe it can listen on different IP's and domains.

3
hellofaduckOP•

Hmmm if i right understand LAN mode its something with autodiscovery. My network is divided into vlans with very strict ACLs so no broadcast, and autodiscovery not working,if i use it right of course. I see only one setting where i can set ip its "cert" and i cant write here 2ips or fqdn names...so i am in deadend now I see only way is 2 servers and its so overkill solution 😭😭

2
NotAnNSASpySatellite•

What about using the domains portion of the User Guide http://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2UserGuide-0.2.7.pdf , pretend its customer1 and custom1...maybe that can do what you're after. But I do see the Caveat of using a DNS name that you can't access it servername/customer1 mhmm...

2