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

M365DSCReport: Add support for creating a report in CSV-format #5501

Merged
merged 10 commits into from
Dec 10, 2024

Conversation

salbeck-sit
Copy link
Contributor

Pull Request (PR) description

This PR adds support for -Type CSV in New-M365DSCReportFromConfiguration and adds dynamic parameter -Delimiter when -Type CSV is used

This Pull Request (PR) fixes the following issues

I'm having issues creating an Excel-report of a configuration. On my local PC where I'm not a local admin the generation of the report fails with a CIM-error and on my admin-server I don't have Excel available. The obvious solution (for me) is to create the report in CSV-format and import it into Excel later.

Task list

  • Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
    Entry should say what was changed and how that affects users (if applicable), and
    reference the issue being resolved (if applicable).
  • Resource parameter descriptions added/updated in the schema.mof.
  • Resource documentation added/updated in README.md.
  • Resource settings.json file contains all required permissions.
  • Examples appropriately added/updated.
  • Unit tests added/updated.
  • New/changed code adheres to DSC Community Style Guidelines.

$newRow = $modelRow.Clone()
if ($row -gt 0)
{
write-verbose "add separator-line in CSV-file between resources"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
write-verbose "add separator-line in CSV-file between resources"
Write-Verbose -Message "Add separator-line in CSV-file between resources"

$newRow.Value = $value
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this empty line.

Comment on lines 718 to 726
begin
{
if ($PSBoundParameters.ContainsKey('Delimiter'))
{
$Delimiter = $PSBoundParameters.Delimiter
}
}
process # required with DynamicParam
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is not correct, leading to a curly bracket on the same line as another end block on line 778.

Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ykuijs ykuijs merged commit d6ed9cb into microsoft:Dev Dec 10, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants