powershell
powershell copied to clipboard
Allow to pass empty values to Set-PnPTenantCdnPolicy
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:
Example with ExcludeRestrictedSiteClassifications:
Example with ExcludeIfNoScriptDisabled:
$null is replaced with an empty string to avoid a runtime exception. This was the error happening without the replacement: