leop1212
asked on
Exchange 2010 powershell public folder size statistic to Excel file
I am looking for a powershell command syntax to get a list of public folder statistics into excel sorted by folder size.
i found this syntax
its only reporting 100 top items and suggests adding a parameter "-ResultSize Unlimited" for all folders.
1. I am not sure where to add unlimited.
2. I'd like size reported in megabites if possible and
$script:CSV = @()
function AddCSV([string]$sName,[str ing]$sSize )
{
$logentry = new-Object -typename System.Object
$logentry | add-Member -memberType noteProperty -name Name -Value $sName
$logentry | add-Member -memberType noteProperty -name Size -Value $sSize
$script:CSV += $logentry
}
foreach ( $pubflr in Get-PublicFolderStatistics -Server "server>")
{
AddCSV $pubflr.AdminDisplayName $pubflr.TotalItemSize
}
$CSV | export-csv -Path "g:\PubFlrs.log"
i found this syntax
its only reporting 100 top items and suggests adding a parameter "-ResultSize Unlimited" for all folders.
1. I am not sure where to add unlimited.
2. I'd like size reported in megabites if possible and
$script:CSV = @()
function AddCSV([string]$sName,[str
{
$logentry = new-Object -typename System.Object
$logentry | add-Member -memberType noteProperty -name Name -Value $sName
$logentry | add-Member -memberType noteProperty -name Size -Value $sSize
$script:CSV += $logentry
}
foreach ( $pubflr in Get-PublicFolderStatistics
{
AddCSV $pubflr.AdminDisplayName $pubflr.TotalItemSize
}
$CSV | export-csv -Path "g:\PubFlrs.log"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
original cacl in pubflrs1 is in line with data while new output is wrong on numbers pubflrs
see attached.
PubFlrs1.log
PubFlrs.log