Skip to content

Commit

Permalink
v2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bk-cs committed Oct 28, 2021
1 parent 9f860e5 commit 857313c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion PSFalcon.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ Command Changes
Added '-Ids' parameter for multi-host support
Modified output to include 'cid', 'device_id', and 'tags'
* Modified output of 'Uninstall-FalconSensor' to include 'cid', 'device_id' and 'status'.
* Updated 'Uninstall-FalconSensor':
Modified output to include include 'cid', 'device_id' and 'status'
Added error message when command is used with Linux/Mac hosts until support is added in the future
* Updated 'Start-FalconSession' to a maximum of 10,000 identifiers to match API changes.
Expand Down
7 changes: 5 additions & 2 deletions Public/psf-sensors.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ function Uninstall-FalconSensor {
)
begin {
$Scripts = @{
Linux = 'echo "not_supported_in_psfalcon"'
Mac = 'echo "not_supported_in_psfalcon"'
Linux = $null
Mac = $null
Windows = 'Start-Sleep -Seconds 5; $RegPath = if ((Get-WmiObject win32_operatingsystem).osarchitectu' +
're -eq "64-bit") { "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" } el' +
'se { "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" }; if (Test-Path $RegPath) { $' +
Expand All @@ -353,6 +353,9 @@ function Uninstall-FalconSensor {
try {
$HostInfo = Get-FalconHost -Ids $PSBoundParameters.Id | Select-Object cid, device_id,
platform_name, device_policies
if ($HostInfo.platform_name -ne 'Windows') {
throw 'Only Windows hosts are currently supported in PSFalcon.'
}
$IdValue = switch ($HostInfo.device_policies.sensor_update.uninstall_protection) {
'ENABLED' { $HostInfo.device_id }
'MAINTENANCE_MODE' { 'MAINTENANCE' }
Expand Down

0 comments on commit 857313c

Please sign in to comment.