mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 06:55:52 +03:00
[GH-ISSUE #1359] Bug: running scripts and sending commands on Microsoft Exchange Servers #848
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#848
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rawbyne on GitHub (Dec 2, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1359
Server Info (please complete the following information):
Installation Method:
Agent Info (please complete the following information):
Describe the bug
If I run a powershell script on this server, which is an exchange-server, I get the following error:
exec: "Powershell": cannot run executable found relative to current directory
I reinstalled the wohle agent, the powershell.exe is available in c:\windows\system32, DISM and SFC Check made with no problems, Server has been restarted several times.
To Reproduce
Steps to reproduce the behavior:
Because I do not know, how the procedure looks like to start the powershell script, I can not reprocedure this. On all other systems I got, the scripts start, but not on this.
Expected behavior
The scripts should run.
Screenshots
no
Additional context
none
@dinger1986 commented on GitHub (Dec 2, 2022):
What happens if you try and run a powershell command via send command or remote background?
It's not an issue I have noticed on my 2016 agents but don't have any running exchange.
Have you got AV on the server? Could that be blocking it?
@rawbyne commented on GitHub (Dec 2, 2022):
Wow. You are fast ;-)
The terminal starts. If I type "powershell", powershell terminal starts. So no problem
@dinger1986 commented on GitHub (Dec 2, 2022):
Did you try right clicking on the agent and then send command, choose powershell and even just send a ping command
@rawbyne commented on GitHub (Dec 2, 2022):
If i use "send command", then use "powershell", command = "ping 1.1.1.1", I get a "bad request" after Timeout.
@dinger1986 commented on GitHub (Dec 2, 2022):
Can you share a screenshot?
Does this work in other 2016 servers for you?
@rawbyne commented on GitHub (Dec 2, 2022):
More info about AV: AV = Defender, Path Exclusions are set.
c:\program files\Mesh Agent
C:\program files\TacticalAgent
c:\programdata\TacticalRMM
@rawbyne commented on GitHub (Dec 2, 2022):
@dinger1986 commented on GitHub (Dec 2, 2022):
Try the same command with cmd please
@rawbyne commented on GitHub (Dec 2, 2022):
I got no Problems on all other servers.
CMD = Same error
@rawbyne commented on GitHub (Dec 2, 2022):
I setup an account for you, if you want to test!
@dinger1986 commented on GitHub (Dec 2, 2022):
Are they showing online? If you cant use send command for cmd or powershell there's something wrong and scripts won't run.
Click through the tabs in remote background do they all load?
@dinger1986 commented on GitHub (Dec 2, 2022):
I could maybe this evening.
@rawbyne commented on GitHub (Dec 2, 2022):
All loading. Agent is online. No other problems, but the scripts....
How to give the credentials to you?
@dinger1986 commented on GitHub (Dec 2, 2022):
Best on discord
@rawbyne commented on GitHub (Dec 6, 2022):
Ola. Did you find something?
@dinger1986 commented on GitHub (Dec 6, 2022):
I replied yesterday, I don't have permissions to see/run anything
@rawbyne commented on GitHub (Dec 6, 2022):
Sorry, now you are admin
@dinger1986 commented on GitHub (Dec 6, 2022):
Thanks, I just logged in there, this seems to be an issue on all your exchange servers (I searched for
EXin the search box), I right clicked and clickedsend command, thenping 8.8.8.8andsend. On every single one they time out, 2012 r2, 2016 and 2019.I have one client who also has an exchange server (most are on 365 now) and I can confirm the same behaviour but I can run scripts on it and I see you can run scripts on your other exchange servers just not on that one you have specified so something must be blocking access to powershell for Tactical Agent as it works from remote background, maybe check AV again. Ill discuss the send commands though as theres something strange about that and get back to you if we need access again but for now please close my account.
@dinger1986 commented on GitHub (Dec 6, 2022):
can you also rename this to
Bug: running scripts and sending commands on Microsoft Exchange Servers@dinger1986 commented on GitHub (Dec 6, 2022):
@rawbyne I edited above as I checked the running scripts and its only one server thats giving the powershell error, its maybe worth checking the exclusions etc incase something is blocking powershell.exe execution, mesh background finds and executes powershell fine.
@rawbyne commented on GitHub (Dec 6, 2022):
Hi there, I checked the exclusions. All is fine.
@dinger1986 commented on GitHub (Dec 6, 2022):
can you please provide the following:
(Get-MpPreference).ExclusionPath@rawbyne commented on GitHub (Dec 6, 2022):
@dinger1986 commented on GitHub (Dec 6, 2022):
can you try them with
\*afterwards, whats the results of the same command on another machine?@dinger1986 commented on GitHub (Dec 6, 2022):
thanks @rawbyne made progress and testing fix on machines prior to rolling out an update
@rawbyne commented on GitHub (Dec 7, 2022):
If you want to, feel free testing it on my server