Skip to content

Get-MgReport* - Typo in -Outfile WARNING text - "Overridden" should be "Overwritten" #3487

@npherson

Description

@npherson

Describe the bug

When using any of the Get-MgReport cmdlets (such as Get-MgReportOffice365ActiveUserDetail or Get-MgReportMailboxUsageDetail), there is a typo in the WARNING test if you use the -Outfile switch and the file already exists:

WARNING: C:\example\report.csv already exists. The file will be overridden.

This should always say "The file will be overwritten." instead since the file gets overwritten - it doesn't override which output file/location that you specificized.

Expected behavior

The warning text when you specify a -outfile that already exists should be:

WARNING: C:\example\report.csv already exists. The file will be overwritten.

How to reproduce

  1. Execute any Get-MgReport* cmdlet while using the -outfile parameter, such as:
    Get-MgReportMailboxUsageDetail -period D180 -outfile example.csv

  2. Run the same command a second time so the file will already exist:
    Get-MgReportMailboxUsageDetail -period D180 -outfile mailboxes.csv

  3. Receive "WARNING:" text which says "overridden" instead of "overwritten"
    WARNING: C:\example\example.csv already exists. The file will be overridden.

SDK Version

2.34.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


Windows 11 24H2
x64

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions