Quantcast
Channel: Microsoft Exchange
Viewing all articles
Browse latest Browse all 20055

Need help with an Exchange powershell script

$
0
0

I have a script here that I found online that will create a csv file that will show me each user inbox size and who it belongs to. I would like to add ItemsinFolder as a part of the report, and my knowledge of powershell is very limited. Below is the script:

param

(

[Switch]$ExportMailboxSize,

[Switch]$CompareMailboxSize,

[String]$LogPath="C:\log",

[String[]]$Identity,

[DateTime]$StartDate,

[DateTime]$EndDate

)

#region Export today's Mailbox Size

if ($ExportMailboxSize)

{

$Counter=0

$UserMailboxStatistics=@()

if(-not ( Test-Path -Path $LogPath))

{

New-Item -ItemType directory -Path $LogPath

}

#Get mailbox identity

if (-not ($Identity))

{

$UserMailboxs=Get-Mailbox -Filter 'RecipientTypeDetails -eq "UserMailbox"' -ResultSize unlimited

}

else

{

$UserMailboxs=$Identity|Get-Mailbox -Filter 'RecipientTypeDetails -eq "UserMailbox"' -ResultSize...


Viewing all articles
Browse latest Browse all 20055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>