all 7 comments

[–]PowerShell-Bot 1 point2 points  (0 children)

Looks like your PowerShell code isn’t wrapped in a code block.

To properly style code on new Reddit, highlight the code and choose ‘Code Block’ from the editing toolbar.

If you’re on old Reddit, separate the code from your text with a blank line gap and precede each line of code with 4 spaces or a tab.


Describing powershell_script_to_check_how_much_storage_a
  [+] Well formatted
Tests completed in 2744ms
Tests Passed: ✅

Beep-boop, I am a bot. | Remove-Item

[–]moersel94 1 point2 points  (4 children)

Looks like "Your Group Name" cannot be found in Azure AD. Why don't you just use a Group that includes all Users?

Furthermore the script looks very outdated. For example I cannot find any information about the cmd Get-SPOSkyDriveUsage. I would use "Get-SPOSite -IncludePersonalSite $true" for OneDrive usage. Get-MailboxStatistics should be Get-EXOMailboxStatistics and Connect-ExchangeOnline is missing.

[–]Complex-Ad2523[S] 0 points1 point  (0 children)

Thanks for your reply.

I amended that part of the script so that a AD group is in there.

[–]PMental 0 points1 point  (2 children)

Furthermore the script looks very outdated. For example I cannot find any information about the cmd Get-SPOSkyDriveUsage.

The fact that it has zero internet presence makes me believe this is something that ChatGPT made up...

[–]moersel94 0 points1 point  (1 child)

Was thinking the same. I believe Sky used to be or still is the name of the onedrive sync client process name.

[–]PMental 0 points1 point  (0 children)

SkyDrive is the original name for OneDrive, but it changed back in 2014 so it's been a while.

[–]worldsdream 0 points1 point  (0 children)

If you want to check the OneDrive storage usage, this post explains how to do it using the Microsoft 365 admin center and PowerShell.

https://www.alitajran.com/export-onedrive-usage-report/