[BUG] Get-PnPTenantSyncClientRestriction returns empty string under ExcludedFileExtensions #3098
Closed
1 of 6 tasks
Labels
bug
Something isn't working
Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
ExcludedFileExtensions is an attribute returned by PnPTenantSyncClientRestriction. The value of ExcludedFileExtensions is set to None by default.
When we run the command Get-PnPTenantSyncClientRestriction we get the expected output as in
:
`PS /app> Get-PnPTenantSyncClientRestriction
BlockMacSync : False
AllowedDomainList : {}
ExcludedFileExtensions : {}
OptOutOfGrooveBlock : False
OptOutOfGrooveSoftBlock : False
DisableReportProblemDialog : False
TenantRestrictionEnabled : False
`
However when we convert this to json like:
PS /app> Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 { "BlockMacSync": false, "AllowedDomainList": [], "ExcludedFileExtensions": [ "" ], "OptOutOfGrooveBlock": false, "OptOutOfGrooveSoftBlock": false, "DisableReportProblemDialog": false, "TenantRestrictionEnabled": false }
Note that there is an empty string inside ExcludedFileExtensions when running the command ConvertTo-Json -Depth 3. Other empty fields like AllowedDomainList : {} however show correct behaviour even with ConvertTo-Json -Depth 3
Expected behavior
Please describe what output you expect to see from the PnP PowerShell Cmdlets
Running Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 should return ExcludedFileExtensions as empty array instead of array with empty string .
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
Running Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3 returns ExcludedFileExtensions as array with empty string
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
PS /app> Get-PnPTenantSyncClientRestriction | ConvertTo-Json -Depth 3
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable
)Manifest 2.1.1
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: