From af6b0833a1e55e30cfc9e2773ebc87187d18d3ec Mon Sep 17 00:00:00 2001 From: Hugo Pereira Brito <101209179+HugoPBrito@users.noreply.github.com> Date: Wed, 7 May 2025 11:44:13 +0200 Subject: [PATCH] fix(powershell): remove platform-specific execution (#7675) --- prowler/lib/powershell/powershell.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/prowler/lib/powershell/powershell.py b/prowler/lib/powershell/powershell.py index f6e058afcd..034d28fa16 100644 --- a/prowler/lib/powershell/powershell.py +++ b/prowler/lib/powershell/powershell.py @@ -1,5 +1,4 @@ import json -import platform import queue import re import subprocess @@ -47,12 +46,7 @@ class PowerShellSession: This is a base implementation that should be extended by subclasses to add specific initialization logic (e.g., credential setup). """ - # Determine the appropriate PowerShell command based on the OS - if platform.system() == "Windows": - powershell_cmd = "powershell" - else: - powershell_cmd = "pwsh" - + powershell_cmd = "pwsh" self.process = subprocess.Popen( [powershell_cmd, "-NoExit", "-Command", "-"], stdin=subprocess.PIPE,