New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The argument "Preview" does not belong to the set "Export,Purge,Retention" #3498
Comments
The solution does support the Preview value. What version of Microsoft365DSC are you using? It may be worth updating to the latest version with update-M365dscmodule, |
@NikCharlebois The resource supports Preview but the problem exists in the ancillary function Get-CurrentAction which is missing it from the ValidateSet Line 678 in dca7e57
|
I am using the latest version released yesterday. There are Preview search actions defined in our tenant that are being pulled from the Get-ComplianceSearchAction on line 719 of MSFT_SCComplianceSearchActions. If Preview search actions aren't supported, can we at least filter them out of the results retrieved by Get-ComplianceSearchAction? Also, Preview is being accounted for in Get-TargetResource, Set-TargetResource, and Test-TargetResource, it's just missing in Get-CurrentAction. |
Got it. Get-CurrentAction should not have enforced a ValidateSet. Out of curiosity, are you able to use the -Preview on the New-ComplianceSearchAction cmdlet for your tenant? That parameter seems to exist in the documentation, but isn't exposed by the cmdlet. Do you know how these Preview actions were created in the first place on the tenant? |
I'm not sure how these were created in my company, they were created before I started. I am able to use the -Preview but only after assigning myself eDiscovery Manager and Admin. Here's a sample script I successfully ran in my personal sandbox tenant: Import-Module ExchangeOnlineManagement #Create a search query specifying a name, where to look, and the search parameters #Start the search query created above #Check status of the search query #Preview the results to compare with the web-results, |
Description of the issue
When exporting the Security And Compliance workload, I am receiving a lot of errors referencing a missing ValidateSet attribute in MSFT_SCComplianceSearchAction.psm1 for every call to the "Get-CurrentAction" function.
...
Microsoft 365 DSC Version
1.23.719.1
Workload
The DSC configuration
Extracting SCComplianceSearchAction using CertificateThumbprint
Verbose logs showing the problem
Cannot validate argument on parameter 'Action'. The argument "Preview" does not belong to the set "Export,Purge,Retention" specified by the ValidateSet attribute.
"Error retrieving data:"
at Get-TargetResource, C:.....\Modules\Microsoft365DSC\1.23.719.1\DSCResources\MSFT_SCComplianceSearchAction.psm1:line 105
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: