powershell icon indicating copy to clipboard operation
powershell copied to clipboard

Allow to pass empty values to Set-PnPTenantCdnPolicy

Open jackpoz opened this issue 1 year ago • 0 comments

Type

  • [x] Bug Fix
  • [ ] New Feature
  • [ ] Sample

Related Issues?

Fixes #3935

What is in this Pull Request ?

Change Set-PnPTenantCdnPolicy to allow PolicyValue parameter to be an empty string or $null, while still being mandatory. Users will still need to specify -PolicyValue parameter. This is the same behavior as when calling Tenant.SetTenantCdnPolicy(..) in CSOM.

Example with IncludeFileExtensions: image image

Example with ExcludeRestrictedSiteClassifications: image

Example with ExcludeIfNoScriptDisabled: image

$null is replaced with an empty string to avoid a runtime exception. This was the error happening without the replacement: null error

jackpoz avatar May 05 '24 20:05 jackpoz