Skip to content

Commit 63920a2

Browse files
KbayerojavjodarylladaJocLRojasmjabascal10
authored
Bugfix/10.6.2/update dependencies (#1099)
* feature: correlation offline mode to avoid rules update * integrate dependencies from agent manager * Add connection checker utility for AWS modules * Add connection checker utility for Bitdefender modules * Change fatal logging to error for connection failures in AWS and Bitdefender modules * add timeout * Add connection checker utility for office 365 modules. * Add connection checker utility for sophos module. * Include arm64 agents * update dependencies * update CI/CD pipelines * remove arm builds * fix message when there is no command output * update version and changelog * Update dependencies * add connection mode * include agent debugger, remove mTLS and fix module names * add arm64 icons * Update changelog * change agent version * feat: update agent guides --------- Co-authored-by: Jose Angel Sanchez Velazquez <sanchezvelazquezjoseangel@gmail.com> Co-authored-by: Yadian Llada Lopez <yadian.llada@gmail.com> Co-authored-by: JocLRojas <joc.l.rojas02@gmail.com> Co-authored-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 8c658ec commit 63920a2

File tree

11 files changed

+234
-100
lines changed

11 files changed

+234
-100
lines changed

agent/agent/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ func DeleteAgent(cnf *config.Config) error {
3939
utils.Logger.ErrorF("error removing UTMStack Agent from Agent Manager %v", err)
4040
}
4141

42-
utils.Logger.Info("UTMStack Agent removed successfully")
42+
utils.Logger.LogF(100, "UTMStack Agent removed successfully from agent manager")
4343
return nil
4444
}

agent/collectors/windows_arm64.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,16 @@ func (w Windows) SendSystemLogs() {
185185
return
186186
}
187187

188+
utils.Logger.LogF(100, "output: %s", string(output))
189+
188190
logLines := strings.Split(string(output), "\n")
189191

190192
validatedLogs := make([]string, 0, len(logLines))
191193

192194
for _, logLine := range logLines {
193195
validatedLog, _, err := validations.ValidateString(logLine, false)
194196
if err != nil {
195-
_ = utils.Logger.LogF(100, "error validating log: %s: %v", logLine, err)
197+
utils.Logger.LogF(100, "error validating log: %s: %v", logLine, err)
196198
continue
197199
}
198200

agent/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,13 @@ func main() {
109109
time.Sleep(5 * time.Second)
110110

111111
case "uninstall":
112-
fmt.Println("Uninstalling UTMStackAgent service ...")
112+
fmt.Print("Uninstalling UTMStackAgent service ...")
113113

114114
cnf, err := config.GetCurrentConfig()
115115
if err != nil {
116116
fmt.Println("Error getting config: ", err)
117117
os.Exit(1)
118118
}
119-
120-
fmt.Print("Deleting agent ... ")
121119
if err = pb.DeleteAgent(cnf); err != nil {
122120
utils.Logger.ErrorF("error deleting agent: %v", err)
123121
}
@@ -127,7 +125,9 @@ func main() {
127125
os.Remove(config.ConfigurationFile)
128126

129127
serv.UninstallService()
130-
utils.Logger.Info("UTMStackAgent service uninstalled correctly")
128+
129+
fmt.Println("[OK]")
130+
fmt.Println("UTMStackAgent service uninstalled correctly")
131131
os.Exit(1)
132132
case "help":
133133
Help()

agent/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "10.6.0"
2+
"version": "10.7.0"
33
}

frontend/src/app/app-module/app-module.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ import {UtmListComponent} from './guides/shared/components/utm-list.component';
5555
import {ModuleIntegrationComponent} from './module-integration/module-integration.component';
5656
import {AppModuleSharedModule} from './shared/app-module-shared.module';
5757
import {LogCollectorComponent} from './guides/shared/components/log-collector.component';
58-
import {InstallLogCollectorComponent} from "./guides/shared/components/install-log-collector.component";
58+
import {InstallLogCollectorComponent} from './guides/shared/components/install-log-collector.component';
59+
import {AgentInstallSelectorComponent} from './guides/shared/components/agent-install-selector.component';
5960

6061

6162
@NgModule({
@@ -111,7 +112,8 @@ import {InstallLogCollectorComponent} from "./guides/shared/components/install-l
111112
StepComponent,
112113
StepDirective,
113114
LogCollectorComponent,
114-
InstallLogCollectorComponent
115+
InstallLogCollectorComponent,
116+
AgentInstallSelectorComponent
115117
],
116118
imports: [
117119
CommonModule,

frontend/src/app/app-module/guides/guide-as400/constants.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ export const PLATFORM = [
44
id: 1,
55
name: 'WINDOWS',
66
install: `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
7-
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
8-
`Invoke-WebRequest -Uri "https://cdn.utmstack.com/collectors/as400/v3.0.1/windows-as400-collector.zip" ` +
9-
`-OutFile ".\\windows-as400-collector.zip"; Expand-Archive -Path ".\\windows-as400-collector.zip" ` +
10-
`-DestinationPath "."; Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
11-
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,
7+
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
8+
`Invoke-WebRequest -Uri "https://V_IP:9001/private/dependencies/collector/windows-as400-collector.zip" ` +
9+
`-OutFile ".\\windows-as400-collector.zip"; Expand-Archive -Path ".\\windows-as400-collector.zip" ` +
10+
`-DestinationPath "."; Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
11+
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,
1212

13-
uninstall: `cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
13+
uninstall: `cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
1414
`Start-Process ".\\utmstack_collectors_installer.exe" -ArgumentList ` +
1515
` 'uninstall', 'as400' -NoNewWindow -Wait -ErrorAction SilentlyContinue ` +
1616
`| Out-Null; Start-Process -FilePath "sc.exe" -ArgumentList 'stop', ` +
@@ -28,13 +28,15 @@ export const PLATFORM = [
2828
id: 2,
2929
name: 'LINUX UBUNTU',
3030
install: `sudo bash -c "apt update -y && apt install wget unzip -y && mkdir -p ` +
31-
`/opt/utmstack-linux-collectors/as400 && cd /opt/utmstack-linux-collectors/as400 && ` +
32-
`wget https://cdn.utmstack.com/collectors/as400/v3.0.1/linux-as400-collector.zip ` +
33-
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 777 ` +
34-
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
35-
`V_IP <secret>V_TOKEN</secret>"`,
31+
`/opt/utmstack-linux-collectors/as400 && cd /opt/utmstack-linux-collectors/as400 && ` +
32+
`wget --no-check-certificate --header='connection-key: V_TOKEN' ` +
33+
`https://V_IP:9001/private/dependencies/collector/linux-as400-collector.zip ` +
34+
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 777 ` +
35+
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
36+
`V_IP V_TOKEN"`,
3637

37-
uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +
38+
39+
uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +
3840
`uninstall as400 && echo 'Removing UTMStack AS400 Collector dependencies...' && sleep 5 && rm ` +
3941
`-rf /opt/utmstack-linux-collectors/as400 && echo 'UTMStack AS400 Collector removed successfully.'"`,
4042

frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,14 @@ <h4 class="card-title mb-0 text-primary">
1616
<div>
1717
<p class="step-guide">
1818
<span class="step_number">1</span>
19-
Install according to your operating system:
19+
Install or uninstall the UTMStack agent according to your operating system:
2020
</p>
2121
<div class="alert alert-warning alert-styled-right">
2222
The following commands contains sensitive information, don't share it.
2323
</div>
24-
<h6 class="font-weight-semibold mt-3 mb-3">Ubuntu 16/18/20+</h6>
25-
26-
<app-utm-code-view [code]="getCommandUbuntu()"></app-utm-code-view>
27-
28-
<h6 class="font-weight-semibold mt-3 mb-3">Centos 7/Red Hat Enterprise Linux</h6>
29-
<app-utm-code-view [code]="getCommandCentos7RedHat()"></app-utm-code-view>
30-
31-
32-
<h6 class="font-weight-semibold mt-3 mb-3">Centos 8/AlmaLinux</h6>
33-
34-
<app-utm-code-view [code]="getCommandCentos8Almalinux()"></app-utm-code-view>
24+
<app-agent-install-selector [platforms]="architectures"></app-agent-install-selector>
3525
</div>
3626
</li>
3727
</ol>
38-
<div class="alert alert-warning alert-styled-right">
39-
The next information is not part of the installation process, is just in case you need to uninstall the agent
40-
</div>
41-
<p>
42-
To uninstall linux agent, run the following command:
43-
<app-utm-code-view [code]="getUninstallCommand()"></app-utm-code-view>
44-
</p>
4528
</div>
4629
</div>

frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,27 @@ export class GuideLinuxAgentComponent implements OnInit {
1414
@Input() version: string;
1515
token: string;
1616

17+
architectures = [
18+
{
19+
id: 1, name: 'Ubuntu 16/18/20+',
20+
install: this.getCommandUbuntu('utmstack-linux-agent'),
21+
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
22+
shell: ''
23+
},
24+
{
25+
id: 2, name: 'Centos 7/Red Hat Enterprise Linux',
26+
install: this.getCommandCentos7RedHat('utmstack-linux-agent'),
27+
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
28+
shell: ''
29+
},
30+
{
31+
id: 3, name: 'Centos 8/AlmaLinux',
32+
install: this.getCommandCentos8Almalinux('utmstack-linux-agent'),
33+
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
34+
shell: ''
35+
}
36+
];
37+
1738
constructor(private federationConnectionService: FederationConnectionService) { }
1839

1940
ngOnInit() {
@@ -31,33 +52,38 @@ export class GuideLinuxAgentComponent implements OnInit {
3152
});
3253
}
3354

34-
getCommandUbuntu(): string {
55+
getCommandUbuntu(installerName: string): string {
3556
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
3657

3758
return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-linux-agent && \
38-
wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
39-
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
40-
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
59+
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
60+
https://${ip}:9001/private/dependencies/agent/${installerName} && \
61+
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
62+
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
4163
}
42-
getCommandCentos7RedHat(): string {
43-
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
4464

45-
return `sudo bash -c "yum install wget -y && mkdir /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent \
46-
https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
47-
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
48-
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
65+
getCommandCentos7RedHat(installerName: string): string {
66+
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
4967

68+
return `sudo bash -c "yum install wget -y && mkdir -p /opt/utmstack-linux-agent && \
69+
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
70+
https://${ip}:9001/private/dependencies/agent/${installerName} && \
71+
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
72+
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
5073
}
51-
getCommandCentos8Almalinux(): string {
74+
75+
getCommandCentos8Almalinux(installerName: string): string {
5276
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
5377

54-
return `sudo bash -c "dnf install wget -y && mkdir /opt/utmstack-linux-agent && \
55-
wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
56-
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
57-
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
78+
return `sudo bash -c "dnf install wget -y && mkdir -p /opt/utmstack-linux-agent && \
79+
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
80+
https://${ip}:9001/private/dependencies/agent/${installerName} && \
81+
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
82+
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
5883
}
59-
getUninstallCommand(): string {
60-
return `sudo bash -c "/opt/utmstack-linux-agent/utmstack_agent_installer uninstall || true; \
84+
85+
getUninstallCommand(installerName: string): string {
86+
return `sudo bash -c "/opt/utmstack-linux-agent/${installerName} uninstall || true; \
6187
systemctl stop UTMStackAgent 2>/dev/null || true; systemctl disable UTMStackAgent 2>/dev/null || true; \
6288
rm /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; systemctl stop UTMStackRedline 2>/dev/null || true; \
6389
systemctl disable UTMStackRedline 2>/dev/null || true; rm /etc/systemd/system/UTMStackRedline.service 2>/dev/null || true; \
@@ -69,4 +95,5 @@ export class GuideLinuxAgentComponent implements OnInit {
6995
echo 'Removing UTMStack Agent dependencies...' && sleep 10 && rm -rf /opt/utmstack-linux-agent && \
7096
echo 'UTMStack Agent dependencies removed successfully.'"`;
7197
}
98+
7299
}

frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.html

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,12 @@ <h4 class="card-title mb-0 text-primary">
1919
<li>
2020
<p class="step-guide">
2121
<span class="step_number">2</span>
22-
To install windows agent, open a Windows powershell terminal as "<b>Administrator</b>" and run the following
23-
command:
22+
To install or uninstall the UTMStack agent, open a Windows PowerShell terminal as "Administrator" and run the following command:
2423
</p>
2524
<div class="alert alert-warning alert-styled-right">
2625
The following command contains sensitive information, don't share it.
2726
</div>
28-
<app-utm-code-view [code]="getCommand()"></app-utm-code-view>
27+
<app-agent-install-selector [platforms]="architectures"></app-agent-install-selector>
2928
</li>
30-
<!-- <li>-->
31-
<!-- <p class="step-guide mb-3">-->
32-
<!-- <span class="step_number">7</span>-->
33-
<!-- Click on the button shown below, to activate the UTMStack features related to this integration-->
34-
<!-- </p>-->
35-
<!-- <app-app-module-activate-button [module]="module.WINDOWS_AGENT" [type]="'integration'"-->
36-
<!-- [disabled]="false"-->
37-
<!-- [serverId]="serverId"-->
38-
<!-- class="mt-3">-->
39-
<!-- </app-app-module-activate-button>-->
40-
<!-- </li>-->
4129
</ol>
42-
<div class="alert alert-warning alert-styled-right">
43-
The next information is not part of the installation process, is just in case you need to uninstall the agent
44-
</div>
45-
<p>
46-
To uninstall windows agent, open a Windows powershell terminal as "<b>Administrator</b>" and run the following
47-
command:
48-
<app-utm-code-view [code]="getUninstallCommand()"></app-utm-code-view>
49-
</p>
50-
</div>
5130
</div>

frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ export class GuideWinlogbeatComponent implements OnInit {
1414
token: string;
1515
@Input() version: string;
1616

17+
architectures = [
18+
{
19+
id: 1, name: 'AMD64',
20+
install: this.getCommand('utmstack_agent_service.exe'),
21+
uninstall: this.getUninstallCommand('utmstack_agent_service.exe'),
22+
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
23+
},
24+
{
25+
id: 2, name: 'ARM64',
26+
install: this.getCommand('utmstack_agent_service_arm64.exe'),
27+
uninstall: this.getUninstallCommand('utmstack_agent_service_arm64.exe'),
28+
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
29+
}
30+
];
31+
1732
constructor(private federationConnectionService: FederationConnectionService) {
1833
}
1934

@@ -32,29 +47,31 @@ export class GuideWinlogbeatComponent implements OnInit {
3247
});
3348
}
3449

35-
getCommand(): string {
50+
getCommand(arch: string): string {
3651
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
52+
3753
return `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Agent"; ` +
38-
`Invoke-WebRequest -Uri "https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer.exe" ` +
39-
`-OutFile "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe"; ` +
40-
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe" ` +
41-
`-ArgumentList 'install', '` + ip + `', '<secret>` + this.token + `</secret>', 'yes' -NoNewWindow -Wait`;
54+
`& curl.exe -k -H "connection-key: <secret>${this.token}</secret>" ` +
55+
`-o "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
56+
`"https://${ip}:9001/private/dependencies/agent/${arch}"; ` +
57+
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
58+
`-ArgumentList 'install', '${ip}', '<secret>${this.token}</secret>', 'yes' -NoNewWindow -Wait`;
4259
}
43-
getUninstallCommand(): string {
44-
return `Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe" -ArgumentList ` +
45-
`'uninstall' -NoNewWindow -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
46-
`-ArgumentList 'stop','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
47-
`-ArgumentList 'delete','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
48-
`-ArgumentList 'stop','UTMStackRedline' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
49-
`-ArgumentList 'delete','UTMStackRedline' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
50-
`-ArgumentList 'stop','UTMStackUpdater' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
51-
`-ArgumentList 'delete','UTMStackUpdater' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
52-
`-ArgumentList 'stop','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
53-
`-ArgumentList 'delete','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
54-
`-ArgumentList 'stop','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
55-
`-ArgumentList 'delete','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
56-
`Write-Host "Removing UTMStack Agent dependencies..."; Start-Sleep -Seconds 10; Remove-Item 'C:\\Program Files\\UTMStack\\UTMStack Agent' ` +
57-
`-Recurse -Force -ErrorAction Stop; Write-Host "UTMStack Agent removed successfully."`;
60+
61+
getUninstallCommand(arch: string): string {
62+
return `Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
63+
`-ArgumentList 'uninstall' -NoNewWindow -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
64+
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
65+
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
66+
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
67+
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
68+
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
69+
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
70+
`Write-Host "Removing UTMStack Agent dependencies..."; ` +
71+
`Start-Sleep -Seconds 10; ` +
72+
`Remove-Item 'C:\\Program Files\\UTMStack\\UTMStack Agent' -Recurse -Force -ErrorAction Stop; ` +
73+
`Write-Host "UTMStack Agent removed successfully."`;
5874
}
5975

76+
6077
}

0 commit comments

Comments
 (0)