Skip to content

Commit

Permalink
Merge pull request #5637 from BuehlerSimon/DisableResilienceDefaults
Browse files Browse the repository at this point in the history
Bugfix: Disable resilience defaults
  • Loading branch information
ykuijs authored Jan 17, 2025
2 parents 77b4059 + 3f42af1 commit 48a8b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# UNRELEASED

* AADConditionalAccessPolicy
* Fixed DisableResilienceDefaults result
* Add DisableResilienceDefaults false szenario
* AADDeviceRegistrationPolicy
* Fixes an error when trying to disable AAD join.
* AADRoleSetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ function Get-TargetResource
#no translation needed
PersistentBrowserIsEnabled = $false -or $Policy.SessionControls.PersistentBrowser.IsEnabled
#no translation needed
DisableResilienceDefaultsIsEnabled = $false -or $Policy.SessionControls.disableResilienceDefaults.IsEnabled
DisableResilienceDefaultsIsEnabled = $false -or $Policy.SessionControls.disableResilienceDefaults
#make false if undefined, true if true
PersistentBrowserMode = [System.String]$Policy.SessionControls.PersistentBrowser.Mode
#no translation needed
Expand Down Expand Up @@ -1745,7 +1745,7 @@ function Set-TargetResource
$NewParameters.Add('grantControls', $GrantControls)
}

if ($ApplicationEnforcedRestrictionsIsEnabled -or $CloudAppSecurityIsEnabled -or $SignInFrequencyIsEnabled -or $PersistentBrowserIsEnabled -or $DisableResilienceDefaultsIsEnabled)
if ($ApplicationEnforcedRestrictionsIsEnabled -or $CloudAppSecurityIsEnabled -or $SignInFrequencyIsEnabled -or $PersistentBrowserIsEnabled -or !([String]::IsNullOrEmpty($DisableResilienceDefaultsIsEnabled)))
{
Write-Verbose -Message 'Set-Targetresource: process session controls'
$sessioncontrols = $null
Expand Down Expand Up @@ -1812,9 +1812,9 @@ function Set-TargetResource
$sessioncontrols.persistentBrowser.isEnabled = $true
$sessioncontrols.persistentBrowser.mode = $PersistentBrowserMode
}
if ($DisableResilienceDefaultsIsEnabled)
if (!([String]::IsNullOrEmpty($DisableResilienceDefaultsIsEnabled)))
{
$sessioncontrols.Add('disableResilienceDefaults', $true)
$sessioncontrols.Add('disableResilienceDefaults', $DisableResilienceDefaultsIsEnabled)
}
$NewParameters.Add('sessionControls', $sessioncontrols)
#add SessionControls to the parameter list
Expand Down

0 comments on commit 48a8b90

Please sign in to comment.