Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bk-cs committed Sep 6, 2021
1 parent b0ac279 commit 23eda65
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
7 changes: 3 additions & 4 deletions Public/mssp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Add-FalconCidGroupMember {

[Parameter(ParameterSetName = '/mssp/entities/cid-group-members/v1:post', Mandatory = $true, Position = 2)]
[ValidatePattern('^\w{32}$')]
[array] $CIDs
[array] $Cids
)
begin {
$Fields = @{
Expand Down Expand Up @@ -220,7 +220,7 @@ function Get-FalconCidGroupMember {
[Parameter(ParameterSetName = '/mssp/queries/cid-group-members/v1:get', Mandatory = $true,
ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 1)]
[ValidatePattern('^\w{32}$')]
[string] $CID,
[string] $Cid,

[Parameter(ParameterSetName = '/mssp/queries/cid-group-members/v1:get', Position = 2)]
[ValidateSet('last_modified_timestamp')]
Expand All @@ -244,7 +244,6 @@ function Get-FalconCidGroupMember {
)
begin {
$Fields = @{
CID = 'cid'
Ids = 'cid_group_ids'
}
}
Expand Down Expand Up @@ -539,7 +538,7 @@ function Remove-FalconCidGroupMember {
[Parameter(ParameterSetName = '/mssp/entities/cid-group-members/v1:delete', Mandatory = $true,
Position = 2)]
[ValidatePattern('^\w{32}$')]
[array] $CIDs
[array] $Cids
)
begin {
$Fields = @{
Expand Down
3 changes: 3 additions & 0 deletions Public/oauth2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ function Request-FalconToken {
param(
[Parameter(ParameterSetName = 'Cloud', ValueFromPipelineByPropertyName = $true, Position = 1)]
[Parameter(ParameterSetName = 'Hostname', ValueFromPipelineByPropertyName = $true, Position = 1)]
[Alias('client_id')]
[ValidatePattern('^\w{32}$')]
[string] $ClientId,

[Parameter(ParameterSetName = 'Cloud', ValueFromPipelineByPropertyName = $true, Position = 2)]
[Parameter(ParameterSetName = 'Hostname', ValueFromPipelineByPropertyName = $true, Position = 2)]
[Alias('client_secret')]
[ValidatePattern('^\w{40}$')]
[string] $ClientSecret,

Expand All @@ -22,6 +24,7 @@ function Request-FalconToken {

[Parameter(ParameterSetName = 'Cloud', ValueFromPipelineByPropertyName = $true, Position = 4)]
[Parameter(ParameterSetName = 'Hostname', ValueFromPipelineByPropertyName = $true, Position = 4)]
[Alias('cid', 'member_cid')]
[ValidatePattern('^\w{32}$')]
[string] $MemberCid
)
Expand Down
5 changes: 3 additions & 2 deletions Public/psfalcon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,8 @@ function Uninstall-FalconSensor {
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 1)]
[ValidatePattern('^\w{32}$')]
[string] $HostId,
[Alias('device_id')]
[string] $Id,

[Parameter()]
[boolean] $QueueOffline
Expand Down Expand Up @@ -1674,7 +1675,7 @@ if (Test-Path $RegPath) {
}
process {
try {
$HostInfo = Get-FalconHost -Ids $PSBoundParameters.HostId | Select-Object cid, device_id,
$HostInfo = Get-FalconHost -Ids $PSBoundParameters.Id | Select-Object cid, device_id,
hostname, device_policies
$Token = if ($HostInfo.device_policies.sensor_update.uninstall_protection -eq 'ENABLED') {
$TokenParam = @{
Expand Down
3 changes: 2 additions & 1 deletion Public/scheduled-report.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function Get-FalconScheduledReport {
Position = 1)]
[Parameter(ParameterSetName = '/reports/entities/report-executions/v1:get', Mandatory = $true,
Position = 1)]
[ValidatePattern('^\w{32}$')]
[array] $Ids,

[Parameter(ParameterSetName = '/reports/queries/scheduled-reports/v1:get', Position = 1)]
Expand Down Expand Up @@ -67,7 +68,7 @@ function Receive-FalconScheduledReport {
param(
[Parameter(ParameterSetName = '/reports/entities/report-executions-download/v1:get', Mandatory = $true,
ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 1)]
#[ValidatePattern('^\d{2,}$')]
[ValidatePattern('^\w{32}$')]
[string] $Id,

[Parameter(ParameterSetName = '/reports/entities/report-executions-download/v1:get', Mandatory = $true,
Expand Down
3 changes: 2 additions & 1 deletion Public/sensor-installers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ function Receive-FalconInstaller {
[CmdletBinding(DefaultParameterSetName = '/sensors/entities/download-installer/v1:get')]
param(
[Parameter(ParameterSetName = '/sensors/entities/download-installer/v1:get', Mandatory = $true,
ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 1)]
ValueFromPipeline = $true, Position = 1)]
[Alias('sha256')]
[ValidatePattern('^\w{64}$')]
[string] $Id,

Expand Down
1 change: 1 addition & 0 deletions Public/sensor-update-policies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function Get-FalconUninstallToken {
param(
[Parameter(ParameterSetName = '/policy/combined/reveal-uninstall-token/v1:post', Mandatory = $true,
ValueFromPipeline = $true, Position = 1)]
[Alias('device_id')]
[ValidatePattern('^(\w{32}|MAINTENANCE)$')]
[string] $DeviceId,

Expand Down
6 changes: 4 additions & 2 deletions Public/usermgmt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ function Edit-FalconUser {
param(
[Parameter(ParameterSetName = '/users/entities/users/v1:patch', Mandatory = $true,
ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 1)]
[Alias('uuid')]
[ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')]
[string] $Id,

[Parameter(ParameterSetName = '/users/entities/users/v1:patch', Position = 2)]
[string] $Firstname,
[string] $FirstName,

[Parameter(ParameterSetName = '/users/entities/users/v1:patch', Position = 3)]
[string] $Lastname
[string] $LastName
)
begin {
$Fields = @{
Expand All @@ -68,6 +69,7 @@ function Get-FalconRole {
param(
[Parameter(ParameterSetName = '/user-roles/queries/user-role-ids-by-user-uuid/v1:get', Mandatory = $true,
Position = 1)]
[Alias('uuid')]
[ValidatePattern('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$')]
[string] $UserId,

Expand Down

0 comments on commit 23eda65

Please sign in to comment.