Skip to content
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

report from config: just dies trying to open the config. #5492

Open
mikeAtArch opened this issue Nov 30, 2024 · 6 comments
Open

report from config: just dies trying to open the config. #5492

mikeAtArch opened this issue Nov 30, 2024 · 6 comments

Comments

@mikeAtArch
Copy link

Description of the issue

I haven't gotten anything out of the report generator.
This is a simple adduser and addgroup export.

New-M365DSCReportFromConfiguration -Type 'HTML' -ConfigurationPath 'C:\users\mike\DSC\temp\ConfigurationData.psd1' -OutputPath 'C:\users\mike\Dsc\temp\M365Report.html' -Verbose -Debug
VERBOSE: Loading file 'C:\users\mike\DSC\temp\ConfigurationData.psd1'

Microsoft 365 DSC Version

1.24.11

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

$resources = @("AADGroup", "AADUser")
Update-M365DSCAllowedGraphScopes -ResourceNameList $resources -Type read

# Exporting resources using credentials
Export-M365DSCConfiguration -Components $resources -TenantId $TenantId -Path .\temp\ 

New-M365DSCReportFromConfiguration -Type 'HTML' -ConfigurationPath 'C:\users\mike\DSC\temp\ConfigurationData.psd1' -OutputPath 'C:\users\mike\Dsc\temp\M365Report.html' -Verbose -Debug

Verbose logs showing the problem

VERBOSE: Loading file 'C:\users\mike\DSC\temp\ConfigurationData.psd1'
just dies.

Environment Information + PowerShell Version

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.19041.5129
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.19041.5129
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
@FabienTschanz
Copy link
Contributor

@mikeAtArch Did you run winrm quickconfig? What happens if you run it in PowerShell 7? Any chance you can provide the configuration you would like to generate a report from?

@mikeAtArch
Copy link
Author

Nothing changed after winrm quickconfig and reboot.

ran updates, no change.

I started without ps7, no difference either direction.

I have what appears to be 50k of clean data in the config file in a user export

@mikeAtArch
Copy link
Author

I sent a generic config through the report generator and it passed through, I'll review the data export and see what I can find

@FabienTschanz
Copy link
Contributor

You can try and narrow it down by selecting a subset of your configuration and try again until the error appears. Once you have it, we can take a look at it and see why it fails.

@mikeAtArch
Copy link
Author

I'm noticing I have dual credentials in my config files. After removing one I got a whole new set of errors.
Notepad++ is unhappy with the open/closing of brackets, but I haven't found anything more than below.

{
param (
[parameter()]
[System.Management.Automation.PSCredential]
$Credential

    [parameter()]
    [System.Management.Automation.PSCredential]
    $Credential
)

@FabienTschanz
Copy link
Contributor

@mikeAtArch The format seems to be broken. You can paste multiline code with three consecutive backticks `, followed by a newline, and again three backticks on a new line. Then you can insert your code snippet there. Or you can upload a redacted version of your M365TenantConfig.ps1 file as .txt and we can take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants