-
Notifications
You must be signed in to change notification settings - Fork 212
Description
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
-
Execute any Get-MgReport* cmdlet while using the -outfile parameter, such as:
Get-MgReportMailboxUsageDetail -period D180 -outfile example.csv -
Run the same command a second time so the file will already exist:
Get-MgReportMailboxUsageDetail -period D180 -outfile mailboxes.csv -
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_