You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Uninstall-FalconSensor command uses the Windows uninstallation script i.e. uninstall_sensor.ps1 instead of using the uninstall_sensor.sh.
There is a flaw in the code of the psf-sensors.ps1 file on line 365.
$Platform is not assigned the value of $HostList.platform_name.
The code should be changed to the following
$HostList = Get-FalconHost -Id $Id | Select-Object $Select
if ($HostList.platform_name -notmatch '^(Windows|Linux)$') {
throw 'Only Windows and Linux hosts are currently supported for uninstallation using PSFalcon.'
}
[string]$Filename = if ($HostList.platform_name -eq 'Linux') { 'uninstall_sensor.sh' } else { 'uninstall_sensor.ps1' }
OR
$HostList = Get-FalconHost -Id $Id | Select-Object $Select
if ($HostList.platform_name -notmatch '^(Windows|Linux)$') {
throw 'Only Windows and Linux hosts are currently supported for uninstallation using PSFalcon.'
}
[string]$Platform = $HostList.platform_name
[string]$Filename = if ($Platform -eq 'Linux') { 'uninstall_sensor.sh' } else { 'uninstall_sensor.ps1' }
To Reproduce
Try to run the uninstallation command for any linux machine.
Expected behavior
The command should use the uninstall_sensor.sh script for uninstallation.
The text was updated successfully, but these errors were encountered:
bk-cs
changed the title
[ BUG ] Uninstall-FalconSensor command uses the windows uninstallation script on Linux machines.
[ BUG ] Uninstall-FalconSensor uses Windows script on Linux
Sep 27, 2024
This fix has been included in the 2.2.8 release which is now available on GitHub. I'm going to leave this issue open until the PowerShell Gallery release is also available.
Describe the bug
The Uninstall-FalconSensor command uses the Windows uninstallation script i.e.
uninstall_sensor.ps1
instead of using theuninstall_sensor.sh
.There is a flaw in the code of the
![image](https://private-user-images.githubusercontent.com/68142807/371418981-a3a55279-312b-4e7b-b8d6-35ab5c086949.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MDA2ODUsIm5iZiI6MTczOTQwMDM4NSwicGF0aCI6Ii82ODE0MjgwNy8zNzE0MTg5ODEtYTNhNTUyNzktMzEyYi00ZTdiLWI4ZDYtMzVhYjVjMDg2OTQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIyNDYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljOTFlMTIxNjJiOTVkZGI0YWQ3Y2Q2ZDc0MTI3NGJjYzhlMmRkODExZjhlMzlhNWNlZjU5MmM2MDNmMDJiOTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HiWpk7I-NwU1RH4eLXOt7ZfcX_ni7DaG8eAv7rAsr5s)
psf-sensors.ps1
file on line 365.$Platform
is not assigned the value of$HostList.platform_name
.The code should be changed to the following
OR
To Reproduce
Try to run the uninstallation command for any linux machine.
Expected behavior
The command should use the
uninstall_sensor.sh
script for uninstallation.The text was updated successfully, but these errors were encountered: