¿Que buzones puedo borrar?

Pues sencillo a la par que efectivo.

Para Exchange Server 2010 / 2007

To TXT:

Get-Mailbox -Org “domain.local/Users/Finance” | Get-MailboxStatistics | sort lastlogontime -descending| ft Displayname,last* > C:\somefile.txt

TO CSV:

Get-Mailbox -Org “domain.local/Users/Finance” | Get-MailboxStatistics | sort lastlogontime -descending| select Displayname,last* | Export-Csv C:\somefile.csv -NoTypeInformation

——————————————————————————–

To TXT:

Get-Mailbox -Org “domain.local/Users/Finance” | Get-MailboxStatistics | sort lastlogontime -descending| ft Displayname,last* > C:\somefile.txt

TO CSV:

Get-Mailbox -Org “domain.local/Users/Finance” | Get-MailboxStatistics | sort lastlogontime -descending| select Displayname,last* | Export-Csv C:\somefile.csv -NoTypeInformation

——————————————————————————–

Este es un poco más completo ya que te indica en que servidor esta cada Mailbox

To TXT:

$Days = 60

$TimeLimit = (Get-Date).AddDays(-$Days)

get-mailboxdatabase | get-mailboxstatistics | where-object {(get-mailboxstatistics $_.LegacyDN).LastLogonTime -eq $NULL -or (get-mailboxstatistics $_.LegacyDN).LastLogonTime -lt $TimeLimit} | ft DisplayName, TotalItemSize, ItemCount, LastLogonTime > C:\somefile.txt

TO CSV:

$Days = 60

$TimeLimit = (Get-Date).AddDays(-$Days)

get-mailboxdatabase | get-mailboxstatistics | where-object {(get-mailboxstatistics $_.LegacyDN).LastLogonTime -eq $NULL -or (get-mailboxstatistics $_.LegacyDN).LastLogonTime -lt $TimeLimit} | ft DisplayName, TotalItemSize, ItemCount, LastLogonTime | Export-Csv C:\somefile.csv -NoTypeInformation

——————————————————————————–

Firma Blog

Anuncios