Skip to content

Commit 7a644bd

Browse files
inject task improvements
1 parent 65b3480 commit 7a644bd

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecSetCIPPAutoBackup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Function Invoke-ExecSetCIPPAutoBackup {
1919
}
2020
Remove-AzDataTableEntity @Table -Entity $task | Out-Null
2121

22-
$TaskBody = @{
22+
$TaskBody = [pscustomobject]@{
2323
TenantFilter = 'AllTenants'
2424
Name = 'Automated CIPP Backup'
2525
Command = @{
2626
value = 'New-CIPPBackup'
2727
label = 'New-CIPPBackup'
2828
}
29-
Parameters = @{ backupType = 'CIPP' }
29+
Parameters = [pscustomobject]@{ backupType = 'CIPP' }
3030
ScheduledTime = $unixtime
3131
Recurrence = '1d'
3232
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ExecJITAdmin.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ Function Invoke-ExecJITAdmin {
171171
Set-CIPPUserJITAdmin @Parameters
172172
}
173173

174-
$DisableTaskBody = @{
174+
$DisableTaskBody = [pscustomobject]@{
175175
TenantFilter = $Request.Body.TenantFilter
176176
Name = "JIT Admin ($($Request.Body.ExpireAction)): $Username"
177177
Command = @{
178178
value = 'Set-CIPPUserJITAdmin'
179179
label = 'Set-CIPPUserJITAdmin'
180180
}
181-
Parameters = @{
181+
Parameters = [pscustomobject]@{
182182
TenantFilter = $Request.Body.TenantFilter
183183
User = @{
184184
'UserPrincipalName' = $Username

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ExecOffboardUser.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Function Invoke-ExecOffboardUser {
2323
Command = @{
2424
value = 'Invoke-CIPPOffboardingJob'
2525
}
26-
Parameters = @{
26+
Parameters = [pscustomobject]@{
2727
Username = $Username
2828
APIName = 'Scheduled Offboarding'
2929
options = $request.body

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCAExclusion.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Function Invoke-ExecCAExclusion {
1818
}
1919
if ($Request.body.vacation -eq 'true') {
2020
$StartDate = $Request.body.StartDate
21-
$TaskBody = @{
21+
$TaskBody = [pscustomobject]@{
2222
TenantFilter = $Request.body.TenantFilter
2323
Name = "Add CA Exclusion Vacation Mode: $Username - $($Request.body.TenantFilter)"
2424
Command = @{
2525
value = 'Set-CIPPCAExclusion'
2626
label = 'Set-CIPPCAExclusion'
2727
}
28-
Parameters = @{
28+
Parameters = [pscustomobject]@{
2929
ExclusionType = 'Add'
3030
UserID = $Request.body.UserID
3131
PolicyId = $Request.body.PolicyId

Modules/CippExtensions/Public/Extension Functions/Register-CippExtensionScheduledTasks.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ function Register-CIPPExtensionScheduledTasks {
7676
if (!$ExistingPushTask -or $Reschedule.IsPresent) {
7777
# push cached data to extension
7878
$in30mins = [int64](([datetime]::UtcNow.AddMinutes(30)) - (Get-Date '1/1/1970')).TotalSeconds
79-
$Task = @{
79+
$Task = [pscustomobject]@{
8080
Name = "$Extension Extension Sync"
8181
Command = @{
8282
value = 'Push-CippExtensionData'
8383
label = 'Push-CippExtensionData'
8484
}
85-
Parameters = @{
85+
Parameters = [pscustomobject]@{
8686
TenantFilter = $Tenant.defaultDomainName
8787
Extension = $Extension
8888
}

0 commit comments

Comments
 (0)