Hallo,
ik ben bezig met een powershell scriptje welke ik online vond, wat proberen aan te passen.
Het PS script welke ik vond heeft volgende inhoud:
View only mailboxes that have exceeded their mailbox quotas To view the size and quota status of only those mailboxes that are larger than their configured mailbox quota values, and to export the results to a CSV file named "C:\My Documents\Exceeded Quotas.csv", run the following command:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -ne "BelowLimit"} | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round(($_.TotalItemSize.Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round(($_.TotalDeletedItemSize.Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-CSV "C:\My Documents\Exceeded Quotas.csv" -NoTypeInformation
Nu had ik graag dat in diezelfde CSV ook het primaire SMTP adres van de gebruiker die de quota overschreden heeft, toegevoegd werd. De bedoeling is om het zo bondig mogelijk te houden, enkel de exceeders en hun email adres in 1 CSV file is voldoende, dan kan ik hen meteen mailen om een cleanup te starten.
heb al verschillende aanpassingen gedaan in het script maar kon de kolom die ik liet aanmaken voor het emailadres helaas nog niet automatisch laten invullen...
Iemand die me wat verder kan helpen?
ik ben bezig met een powershell scriptje welke ik online vond, wat proberen aan te passen.
Het PS script welke ik vond heeft volgende inhoud:
View only mailboxes that have exceeded their mailbox quotas To view the size and quota status of only those mailboxes that are larger than their configured mailbox quota values, and to export the results to a CSV file named "C:\My Documents\Exceeded Quotas.csv", run the following command:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -ne "BelowLimit"} | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round(($_.TotalItemSize.Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round(($_.TotalDeletedItemSize.Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-CSV "C:\My Documents\Exceeded Quotas.csv" -NoTypeInformation
Nu had ik graag dat in diezelfde CSV ook het primaire SMTP adres van de gebruiker die de quota overschreden heeft, toegevoegd werd. De bedoeling is om het zo bondig mogelijk te houden, enkel de exceeders en hun email adres in 1 CSV file is voldoende, dan kan ik hen meteen mailen om een cleanup te starten.
heb al verschillende aanpassingen gedaan in het script maar kon de kolom die ik liet aanmaken voor het emailadres helaas nog niet automatisch laten invullen...
Iemand die me wat verder kan helpen?