-
Notifications
You must be signed in to change notification settings - Fork 523
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
Assert Blueprint detects no resources to assess #2048
Comments
Also seems just doing an export and then compare is not working either. New-M365DSCDeltaReport |
Did some troubleshooting on this and found the root cause: When creating the Delta report, the DSCParser converts the DSC configuration into an object. The DSCParser is using the AST to parse through the DSC config and unfortunately the Settings parameter is being tagged as a Keyword by the AST. That is messing up the code, which in turn generates an incorrect object. That incorrect object is then processed by the Delta report code, which results in the errors 😢 The only way to fix this is to change the name of the Settings parameter to something that is not marked as a keyword, but this will mean a breaking change! |
Oh no! so the DSC portion of this is effectively broken! We can import and export but not actually check what state its at! |
This only applies to the SCSensitivityLabel resource, all other resources should be fine. Also, you should still be able to do a Test-DscConfiguration to see if your tenant is still in the Desired State or not. |
Settings keyword is using to create Meta Configurations / LCM Configuration, for example: [DSCLocalConfigurationManager()]
configuration LCMConfig
{
Node localhost
{
Settings
{
RefreshMode = 'Push'
}
}
} |
Hello |
I am also struggling with getting test-dscconfiguration working, i thought it was missing some settings on my side! |
You can test your configuration like this: Test-DscConfiguration -Path "C:\Dsc\Configurations" This requires you to have .mof file within the folder specified. |
OK so this command is not in the scope of m365dsc |
Generating a mof file is already built in into the configuration, if you exported this with M365DSC. you need to compile the configuration. Basically it’s calling the exported ps1 file with the credentials parameter. |
Performing a Test-DscConfiguration is default PowerShell Desired State Configuration functionality. In order to do this, you:
More information can be found here: https://microsoft365dsc.com/user-guide/get-started/deploying-configurations/ |
To learn more about the basics of DSC, I highly recommend watching this training: Getting Started with PowerShell Desired State Configuration! |
Hello `Exception calling "IndexOf" with "2" argument(s): "Index was out of range. Must be non-negative and less than the size
Exception calling "Remove" with "2" argument(s): "StartIndex cannot be less than zero.
Selected BluePrint contains (4) components to assess. |
Any chances you could share your blueprint here? It appears that the blueprint you are using doesn't define a module version in it via Import-DscResource. |
It did actually create a report this time, I'll grab the blueprint and share it here, but I'm sure I just did an export and then tested it again. |
Ok, then would you consider this issue fixed? Thanks |
I'm not sure if it's working correctly or not, I didn't get a chance to do it yet today but will share blueprint shortly |
@martynstar any updates on this? Thanks |
Yes sorry let's close this for now. |
Details of the scenario you tried and the problem that is occurring
Trying to run a Blueprint
This pop up shows no items to assess
Selected BluePrint contains (0) components to assess.
Initiating the Export of those (0) components from the tenant...
i have a blueprint as submitted on issue #2007
This then goes about trying to extract the whole of the m365 settings.
I am only trying to sort Endpoint/intune at the moment, but i get 186 options being downloaded.
I have tried a straight export with the intune settings, and then running it back as a blueprint (incase versions have changed it) but it doesnt detect anything to assess.
Verbose logs showing the problem
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
OsName : Microsoft Windows Server 2022 Datacenter Azure Edition
OsOperatingSystemSKU : 407
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version of the DSC module that was used ('dev' if using current dev branch)
Generated with Microsoft365DSC version 1.22.629.1
The text was updated successfully, but these errors were encountered: