-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb9068
commit fe59301
Showing
4 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Modules/CIPPCore/Public/AuditLogs/Remove-CippAuditLogSearch.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function Remove-CippAuditLogSearch { | ||
<# | ||
.SYNOPSIS | ||
Get the results of an audit log search | ||
.DESCRIPTION | ||
Get the results of an audit log search from the Graph API | ||
.PARAMETER TenantFilter | ||
The tenant to filter on. | ||
.PARAMETER QueryId | ||
The ID of the query to get the results for. | ||
#> | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$TenantFilter, | ||
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)] | ||
[Alias('id')] | ||
[string]$QueryId | ||
) | ||
|
||
process { | ||
New-GraphPostRequest -type DELETE -body '{}' -uri ('https://graph.microsoft.com/beta/security/auditLog/queries/{0}' -f $QueryId) -AsApp $true -tenantid $TenantFilter | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters