SOLVED

Does someone have a script already written that outputs 365 mailbox sizes and archive sizes in GB as

%3CLINGO-SUB%20id%3D%22lingo-sub-1387949%22%20slang%3D%22en-US%22%3EDoes%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20GB%20as%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1387949%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EIf%20anyone%20has%20the%20time%20to%20help%20I%20would%20appreciate%20your%20help%20for%20something%20that%20is%20beyond%20my%20skill%20set.%26nbsp%3B%20%26nbsp%3BI%20spent%20hours%20on%20this%20with%20no%20luck%3C%2FP%3E%3CP%3EI%20can%20output%20mailbox%20sizes%20in%20GB%20with%20this%20script%3C%2FP%3E%3CP%3EGet-Mailbox%20-ResultSize%20Unlimited%26nbsp%3B%20%7C%20Get-MailboxStatistics%20%7C%3CBR%20%2F%3ESelect-Object%20-Property%20%40%7Blabel%3D%E2%80%9DUser%E2%80%9D%3Bexpression%3D%7B%24_.DisplayName%7D%7D%2C%3CBR%20%2F%3E%40%7Blabel%3D%E2%80%9DTotal%20Size%20(GB)%E2%80%9D%3Bexpression%3D%7B%5Bmath%5D%3A%3ARound(%60%3CBR%20%2F%3E(%24_.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2)%7D%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20output%20archive%20mailbox%20sizes%20with%20this%20script%3C%2FP%3E%3CP%3EGet-Mailbox%20-resultsize%20unlimited%20%7C%20Select-Object%20name%2C%20%40%7Bn%3D%22Archive%20Size%22%3Be%3D%7B(Get-MailboxStatistics%20-archive%20%24_.identity).TotalItemSize%7D%7D%2C%40%7Blabel%3D%22(GB)%22%3Bexpression%3D%7B%5Bmath%5D%3A%3ARound(%60%3CBR%20%2F%3E(%24_.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2)%7D%7D%20%7C%20ft%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20a%20single%20csv%20output%20with%20both%20the%20archive%20and%20mailbox%20sizes%20next%20to%20the%20person's%20name%20and%20in%20GB%20as%20the%20measurement.%3C%2FP%3E%3CP%3EThis%20script%20will%20output%20both%20however%20it%20won't%20put%20them%20in%20GB.%26nbsp%3B%3C%2FP%3E%3CP%3Econnect-msolservice%3CBR%20%2F%3E%24Session%20%3D%20New-PSSession%20-ConfigurationName%20Microsoft.Exchange%20-ConnectionUri%20%3CA%20href%3D%22https%3A%2F%2Foutlook.office365.com%2Fpowershell-liveid%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office365.com%2Fpowershell-liveid%2F%3C%2FA%3E%20-Credential%20%24UserCredential%20-Authentication%20Basic%20-AllowRedirection%3CBR%20%2F%3EImport-PSSession%20%24Session%20-DisableNameChecking%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3ESet-ExecutionPolicy%20RemoteSigned%3CBR%20%2F%3EEnable-PSRemoting%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWrite-Host%20%22Gathering%20Stats%2C%20Please%20Wait..%22%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%24Mailboxes%20%3D%20Get-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select%20UserPrincipalName%2C%20identity%2C%20ArchiveStatus%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%24MailboxSizes%20%3D%20%40()%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3Eforeach%20(%24Mailbox%20in%20%24Mailboxes)%20%7B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%24ObjProperties%20%3D%20New-Object%20PSObject%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%24MailboxStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20%7C%20Select%20LastLogonTime%2C%20TotalItemSize%2C%20ItemCount%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22UserPrincipalName%22%20-Value%20%24Mailbox.UserPrincipalName%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Last%20Logged%20In%22%20-Value%20%24MailboxStats.LastLogonTime%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Size%22%20-Value%20%24MailboxStats.TotalItemSize%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Item%20Count%22%20-Value%20%24MailboxStats.ItemCount%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20if%20(%24Mailbox.ArchiveStatus%20-eq%20%22Active%22)%20%7B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%24ArchiveStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20-Archive%20%7C%20Select%20TotalItemSize%2C%20ItemCount%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%20%24ArchiveStats.TotalItemSize%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%24ArchiveStats.ItemCount%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7D%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20else%20%7B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%20%22No%20Archive%22%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Add-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%22No%20Archive%22%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7D%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%24MailboxSizes%20%2B%3D%20%24ObjProperties%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%7D%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%24MailboxSizes%20%7C%20Export-csv%20%22C%3A%5Cinboxsizes.csv%22%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3EGet-PSSession%20%7C%20Remove-PSSession%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20asking%20for%20someone%20who%20has%20a%20script%20or%20a%20fix%20for%20my%20script%20to%20assist%20please%20with%20the%20specific%20change%20to%20where%20in%20the%20script%20great!%26nbsp%3B%20%26nbsp%3BIf%20your%20solution%20is%20to%20learn%20scripting%20I%20appreciate%20the%20advice%20but%20it%20is%20unlikely%20I%20can%20come%20up%20with%20the%20solution.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20the%20IT%20scripting%20guys%20forum%20and%20that%20was%20the%20response%20I%20got.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1387949%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%20center%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Administration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1388547%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388547%22%20slang%3D%22en-US%22%3E%3CP%3EAll%20you%20need%20to%20do%20is%20add%20the%20%22calculation%22%20to%20the%20output%2C%20as%20in%20replace%20it%20with%20something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%5Bmath%5D%3A%3ARound(%3C%2FSPAN%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E(%3CSPAN%20style%3D%22background-color%3A%20%23ffffff%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20inline%3B%20float%3A%20none%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%24ArchiveStats.TotalItemSize%3C%2FSPAN%3E.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1389282%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389282%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20your%20response!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20should%20be%20clear%20-%20I%20am%20OK%20with%20about%20a%201%20line%20script.%26nbsp%3B%20%26nbsp%3BAnything%20beyond%20that%20is%20beyond%20my%20skill%20level.%26nbsp%3B%20%26nbsp%3BI%20tried%20to%20put%20that%20in%20but%20had%20no%20luck.%26nbsp%3B%20%26nbsp%3BI%20do%20appreciate%20any%20help%20but%20I%20regret%26nbsp%3B%20to%20say%20I'll%20need%20the%20answer%20spoon%20fed%20as%20to%20which%20script%20and%20exactly%20where%20to%20make%20the%20changes.%26nbsp%3B%20%26nbsp%3BI%20tested%20with%20the%203%20scripts%20I%20posted%20and%20couldn't%20get%20it%20to%20work.%26nbsp%3B%20I'm%20not%20saying%20your%20answer%20isn't%20helpful%20-%20just%20that%20I%20couldn't%20figure%20out%20how%20to%20make%20it%20work.%26nbsp%3B%20%26nbsp%3B%20Thanks%20again%20-%20sorry%20but%20powershell%20eludes%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1389607%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389607%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20replace%20the%20corresponding%20line%20in%20the%20%22long%22%20script%20with%20the%20one%20I%20pasted%20above%20-%20if%20this%20generates%20the%20output%20you%20expect%2C%20you%20can%20do%20the%20same%20for%20the%20other%20%22size%22%20field.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1389616%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389616%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20this%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWrite-Host%20%22Gathering%20Stats%2C%20Please%20Wait..%22%3CBR%20%2F%3E%3CBR%20%2F%3E%24Mailboxes%20%3D%20Get-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select%20UserPrincipalName%2C%20identity%2C%20ArchiveStatus%3CBR%20%2F%3E%3CBR%20%2F%3E%24MailboxSizes%20%3D%20%40()%3CBR%20%2F%3E%3CBR%20%2F%3Eforeach%20(%24Mailbox%20in%20%24Mailboxes)%20%7B%3CBR%20%2F%3E%3CBR%20%2F%3E%24ObjProperties%20%3D%20New-Object%20PSObject%3CBR%20%2F%3E%3CBR%20%2F%3E%24MailboxStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20%7C%20Select%20LastLogonTime%2C%20TotalItemSize%2C%20ItemCount%3CBR%20%2F%3E%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22UserPrincipalName%22%20-Value%20%24Mailbox.UserPrincipalName%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Last%20Logged%20In%22%20-Value%20%24MailboxStats.LastLogonTime%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Size%22%20-Value%20%24MailboxStats.TotalItemSize%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Item%20Count%22%20-Value%20%24MailboxStats.ItemCount%3CBR%20%2F%3E%3CBR%20%2F%3Eif%20(%24Mailbox.ArchiveStatus%20-eq%20%22Active%22)%20%7B%3CBR%20%2F%3E%3CBR%20%2F%3E%24ArchiveStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20-Archive%20%7C%20Select%20TotalItemSize%2C%20ItemCount%3CBR%20%2F%3E%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%3C%2FP%3E%3CP%3E%5Bmath%5D%3A%3ARound((%24ArchiveStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2)%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%24ArchiveStats.ItemCount%3CBR%20%2F%3E%3CBR%20%2F%3E%7D%3CBR%20%2F%3Eelse%20%7B%3CBR%20%2F%3E%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%20%22No%20Archive%22%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%22No%20Archive%22%3CBR%20%2F%3E%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3E%24MailboxSizes%20%2B%3D%20%24ObjProperties%3CBR%20%2F%3E%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3E%24MailboxSizes%20%7C%20Export-csv%20%22C%3A%5Cinboxsizes.csv%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20getting%26nbsp%3B%3C%2FP%3E%3CP%3EAdd-Member%20%3A%20Missing%20an%20argument%20for%20parameter%20'Value'.%20Specify%20a%20parameter%20of%20type%20'System.Object'%20and%20try%20again.%3CBR%20%2F%3EAt%20line%3A16%20char%3A118%3CBR%20%2F%3E%2B%20...%20t%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%3CBR%20%2F%3E%2B%20~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidArgument%3A%20(%3A)%20%5BAdd-Member%5D%2C%20ParameterBindingException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20MissingArgument%2CMicrosoft.PowerShell.Commands.AddMemberCommand%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1389793%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389793%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20seem%20to%20have%20inserted%20a%20new%20line%20there.%20Try%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EWrite-Host%20%22Gathering%20Stats%2C%20Please%20Wait..%22%0A%0A%24Mailboxes%20%3D%20Get-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select%20UserPrincipalName%2C%20identity%2C%20ArchiveStatus%0A%0A%24MailboxSizes%20%3D%20%40()%0A%0Aforeach%20(%24Mailbox%20in%20%24Mailboxes)%20%7B%0A%0A%24ObjProperties%20%3D%20New-Object%20PSObject%0A%0A%24MailboxStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20%7C%20Select%20LastLogonTime%2C%20TotalItemSize%2C%20ItemCount%0A%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22UserPrincipalName%22%20-Value%20%24Mailbox.UserPrincipalName%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Last%20Logged%20In%22%20-Value%20%24MailboxStats.LastLogonTime%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Size%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24MailboxStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Item%20Count%22%20-Value%20%24MailboxStats.ItemCount%0A%0Aif%20(%24Mailbox.ArchiveStatus%20-eq%20%22Active%22)%20%7B%0A%0A%24ArchiveStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20-Archive%20%7C%20Select%20TotalItemSize%2C%20ItemCount%0A%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24ArchiveStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%24ArchiveStats.ItemCount%0A%0A%7D%0Aelse%20%7B%0A%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%22%20-Value%20%22No%20Archive%22%0AAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%22No%20Archive%22%0A%0A%7D%0A%0A%24MailboxSizes%20%2B%3D%20%24ObjProperties%0A%0A%7D%0A%0A%24MailboxSizes%20%7C%20Export-csv%20%22C%3A%5Cinboxsizes.csv%22%20-NoTypeInformation%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1389929%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389929%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAMAZING%20work!!%26nbsp%3B%20%26nbsp%3B%20Thanks%20so%20very%20much!!%26nbsp%3B%20I've%20been%20kicking%20that%20around%20for%20over%20a%20day%20with%20zero%20progress%20and%20you%20solved%20it%20just%20like%20that.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20where%20I'm%20at%20with%20the%20code%20now%20and%20if%20you%20don't%20mind%20-%20how%20do%20I%20add%20the%20user%20name%20in%20addition%20to%20their%20login%3F%26nbsp%3B%20%26nbsp%3BIf%20you%20don't%20have%20time%20-%20I%20completely%20understand%20you%20have%20been%20wonderful!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWrite-Host%20%22Gathering%20Stats%2C%20Please%20Wait..%22%3C%2FP%3E%3CP%3E%24Mailboxes%20%3D%20Get-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select%20UserPrincipalName%2C%20identity%2C%20ArchiveStatus%3C%2FP%3E%3CP%3E%24MailboxSizes%20%3D%20%40()%3C%2FP%3E%3CP%3Eforeach%20(%24Mailbox%20in%20%24Mailboxes)%20%7B%3C%2FP%3E%3CP%3E%24ObjProperties%20%3D%20New-Object%20PSObject%3C%2FP%3E%3CP%3E%24MailboxStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20%7C%20Select%20LastLogonTime%2C%20TotalItemSize%2C%20ItemCount%3C%2FP%3E%3CP%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22UserPrincipalName%22%20-Value%20%24Mailbox.UserPrincipalName%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Last%20Logged%20In%22%20-Value%20%24MailboxStats.LastLogonTime%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Size%20(GB)%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24MailboxStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%3C%2FP%3E%3CP%3E%3CBR%20%2F%3Eif%20(%24Mailbox.ArchiveStatus%20-eq%20%22Active%22)%20%7B%3C%2FP%3E%3CP%3E%24ArchiveStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20-Archive%20%7C%20Select%20TotalItemSize%2C%20ItemCount%3C%2FP%3E%3CP%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%20(GB)%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24ArchiveStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Item%20Count%22%20-Value%20%24ArchiveStats.ItemCount%3C%2FP%3E%3CP%3E%7D%3CBR%20%2F%3Eelse%20%7B%3C%2FP%3E%3CP%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%20(GB)%22%20-Value%20%220%22%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%24MailboxSizes%20%2B%3D%20%24ObjProperties%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%24MailboxSizes%20%7C%20Export-csv%20%22C%3A%5Cinboxsizes.csv%22%20-NoTypeInformation%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20wonderful%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392057%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392057%22%20slang%3D%22en-US%22%3E%3CP%3EInsert%20another%20line%20in%20between%20the%26nbsp%3B%3CSPAN%20style%3D%22background-color%3A%20%23ffffff%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20inline%3B%20float%3A%20none%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EAdd-Member%3C%2FSPAN%3E%20ones%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22DisplayName%22%20-Value%20%24Mailbox.DisplayName%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392757%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20someone%20have%20a%20script%20already%20written%20that%20outputs%20365%20mailbox%20sizes%20and%20archive%20sizes%20in%20G%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392757%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%20%26nbsp%3BThanks%20again!!!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20anyone%20wanting%20to%20know%20how%20it%20looks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24Session%20%3D%20New-PSSession%20-ConfigurationName%20Microsoft.Exchange%20-ConnectionUri%20%3CA%20href%3D%22https%3A%2F%2Foutlook.office365.com%2Fpowershell-liveid%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office365.com%2Fpowershell-liveid%2F%3C%2FA%3E%20-Credential%20%24UserCredential%20-Authentication%20Basic%20-AllowRedirection%3CBR%20%2F%3EImport-PSSession%20%24Session%20-DisableNameChecking%3CBR%20%2F%3ESet-ExecutionPolicy%20RemoteSigned%3CBR%20%2F%3EEnable-PSRemoting%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWrite-Host%20%22Gathering%20Stats%2C%20Please%20Wait..%22%3CBR%20%2F%3E%24Mailboxes%20%3D%20Get-Mailbox%20-ResultSize%20Unlimited%20%7C%20Select%20UserPrincipalName%2C%20identity%2C%20ArchiveStatus%3CBR%20%2F%3E%24MailboxSizes%20%3D%20%40()%3CBR%20%2F%3Eforeach%20(%24Mailbox%20in%20%24Mailboxes)%20%7B%3CBR%20%2F%3E%24ObjProperties%20%3D%20New-Object%20PSObject%3CBR%20%2F%3E%24MailboxStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20%7C%20Select%20DisplayName%2C%20LastLogonTime%2C%20TotalItemSize%2C%20ItemCount%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Display%20Name%22%20-Value%20%24MailboxStats.DisplayName%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22UserPrincipalName%22%20-Value%20%24Mailbox.UserPrincipalName%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Last%20Logged%20In%22%20-Value%20%24MailboxStats.LastLogonTime%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Mailbox%20Size%20(GB)%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24MailboxStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%3C%2FP%3E%3CP%3Eif%20(%24Mailbox.ArchiveStatus%20-eq%20%22Active%22)%20%7B%3CBR%20%2F%3E%24ArchiveStats%20%3D%20Get-MailboxStatistics%20%24Mailbox.UserPrincipalname%20-Archive%20%7C%20Select%20TotalItemSize%2C%20ItemCount%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%20(GB)%22%20-Value%20(%5Bmath%5D%3A%3ARound((%24ArchiveStats.TotalItemSize.ToString().Split(%22(%22)%5B1%5D.Split(%22%20%22)%5B0%5D.Replace(%22%2C%22%2C%22%22)%2F1GB)%2C2))%3CBR%20%2F%3E%7D%3CBR%20%2F%3Eelse%20%7B%3CBR%20%2F%3EAdd-Member%20-InputObject%20%24ObjProperties%20-MemberType%20NoteProperty%20-Name%20%22Archive%20Size%20(GB)%22%20-Value%20%220%22%3C%2FP%3E%3CP%3E%7D%3CBR%20%2F%3E%24MailboxSizes%20%2B%3D%20%24ObjProperties%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%24MailboxSizes%20%7C%20Export-csv%20%22C%3A%5Cinboxsizes.csv%22%20-NoTypeInformation%3CBR%20%2F%3E%3CBR%20%2F%3EGet-PSSession%20%7C%20Remove-PSSession%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hello,

If anyone has the time to help I would appreciate your help for something that is beyond my skill set.   I spent hours on this with no luck

I can output mailbox sizes in GB with this script

Get-Mailbox -ResultSize Unlimited  | Get-MailboxStatistics |
Select-Object -Property @{label=”User”;expression={$_.DisplayName}},
@{label=”Total Size (GB)”;expression={[math]::Round(`
($_.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)}}

 

I can output archive mailbox sizes with this script

Get-Mailbox -resultsize unlimited | Select-Object name, @{n="Archive Size";e={(Get-MailboxStatistics -archive $_.identity).TotalItemSize}},@{label="(GB)";expression={[math]::Round(`
($_.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)}} | ft

 

I would like a single csv output with both the archive and mailbox sizes next to the person's name and in GB as the measurement.

This script will output both however it won't put them in GB. 

connect-msolservice
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking  
Set-ExecutionPolicy RemoteSigned
Enable-PSRemoting


Write-Host "Gathering Stats, Please Wait.." 
  
$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, identity, ArchiveStatus 
  
$MailboxSizes = @() 
  
foreach ($Mailbox in $Mailboxes) { 
  
                $ObjProperties = New-Object PSObject 
                
                $MailboxStats = Get-MailboxStatistics $Mailbox.UserPrincipalname | Select LastLogonTime, TotalItemSize, ItemCount 
                
                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "UserPrincipalName" -Value $Mailbox.UserPrincipalName 
                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Last Logged In" -Value $MailboxStats.LastLogonTime 
                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Size" -Value $MailboxStats.TotalItemSize 
                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Item Count" -Value $MailboxStats.ItemCount 
                
                if ($Mailbox.ArchiveStatus -eq "Active") { 
                
                                $ArchiveStats = Get-MailboxStatistics $Mailbox.UserPrincipalname -Archive | Select TotalItemSize, ItemCount 
                                
                                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value $ArchiveStats.TotalItemSize 
                                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value $ArchiveStats.ItemCount 
  
                } 
                else { 
                
                                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value "No Archive" 
                                Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value "No Archive" 
                                
                } 
                
                $MailboxSizes += $ObjProperties 
  
}              
                
$MailboxSizes | Export-csv "C:\inboxsizes.csv" 
  
Get-PSSession | Remove-PSSession

 

I'm asking for someone who has a script or a fix for my script to assist please with the specific change to where in the script great!   If your solution is to learn scripting I appreciate the advice but it is unlikely I can come up with the solution.  

I tried the IT scripting guys forum and that was the response I got.

 

 

 

 

8 Replies
Highlighted

All you need to do is add the "calculation" to the output, as in replace it with something like this:

 

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value 

[math]::Round(($ArchiveStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)

Highlighted

@Vasil Michev 

Thank you so much for your response!

 

I should be clear - I am OK with about a 1 line script.   Anything beyond that is beyond my skill level.   I tried to put that in but had no luck.   I do appreciate any help but I regret  to say I'll need the answer spoon fed as to which script and exactly where to make the changes.   I tested with the 3 scripts I posted and couldn't get it to work.  I'm not saying your answer isn't helpful - just that I couldn't figure out how to make it work.    Thanks again - sorry but powershell eludes me.

Highlighted

Just replace the corresponding line in the "long" script with the one I pasted above - if this generates the output you expect, you can do the same for the other "size" field.

Highlighted

@Vasil Michev 

 

Thanks.

 

I tried this - 


Write-Host "Gathering Stats, Please Wait.."

$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, identity, ArchiveStatus

$MailboxSizes = @()

foreach ($Mailbox in $Mailboxes) {

$ObjProperties = New-Object PSObject

$MailboxStats = Get-MailboxStatistics $Mailbox.UserPrincipalname | Select LastLogonTime, TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "UserPrincipalName" -Value $Mailbox.UserPrincipalName
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Last Logged In" -Value $MailboxStats.LastLogonTime
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Size" -Value $MailboxStats.TotalItemSize
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Item Count" -Value $MailboxStats.ItemCount

if ($Mailbox.ArchiveStatus -eq "Active") {

$ArchiveStats = Get-MailboxStatistics $Mailbox.UserPrincipalname -Archive | Select TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value

[math]::Round(($ArchiveStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value $ArchiveStats.ItemCount

}
else {

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value "No Archive"
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value "No Archive"

}

$MailboxSizes += $ObjProperties

}

$MailboxSizes | Export-csv "C:\inboxsizes.csv"

 

 

I'm getting 

Add-Member : Missing an argument for parameter 'Value'. Specify a parameter of type 'System.Object' and try again.
At line:16 char:118
+ ... t $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value
+ ~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Add-Member], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,Microsoft.PowerShell.Commands.AddMemberCommand

Highlighted
Solution

You seem to have inserted a new line there. Try this:

 

Write-Host "Gathering Stats, Please Wait.."

$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, identity, ArchiveStatus

$MailboxSizes = @()

foreach ($Mailbox in $Mailboxes) {

$ObjProperties = New-Object PSObject

$MailboxStats = Get-MailboxStatistics $Mailbox.UserPrincipalname | Select LastLogonTime, TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "UserPrincipalName" -Value $Mailbox.UserPrincipalName
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Last Logged In" -Value $MailboxStats.LastLogonTime
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Size" -Value ([math]::Round(($MailboxStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Item Count" -Value $MailboxStats.ItemCount

if ($Mailbox.ArchiveStatus -eq "Active") {

$ArchiveStats = Get-MailboxStatistics $Mailbox.UserPrincipalname -Archive | Select TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value ([math]::Round(($ArchiveStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value $ArchiveStats.ItemCount

}
else {

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size" -Value "No Archive"
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value "No Archive"

}

$MailboxSizes += $ObjProperties

}

$MailboxSizes | Export-csv "C:\inboxsizes.csv" -NoTypeInformation
Highlighted

@Vasil Michev 

 

AMAZING work!!    Thanks so very much!!  I've been kicking that around for over a day with zero progress and you solved it just like that.   

 

This is where I'm at with the code now and if you don't mind - how do I add the user name in addition to their login?   If you don't have time - I completely understand you have been wonderful!

 

 

Write-Host "Gathering Stats, Please Wait.."

$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, identity, ArchiveStatus

$MailboxSizes = @()

foreach ($Mailbox in $Mailboxes) {

$ObjProperties = New-Object PSObject

$MailboxStats = Get-MailboxStatistics $Mailbox.UserPrincipalname | Select LastLogonTime, TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "UserPrincipalName" -Value $Mailbox.UserPrincipalName
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Last Logged In" -Value $MailboxStats.LastLogonTime
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Size (GB)" -Value ([math]::Round(($MailboxStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))


if ($Mailbox.ArchiveStatus -eq "Active") {

$ArchiveStats = Get-MailboxStatistics $Mailbox.UserPrincipalname -Archive | Select TotalItemSize, ItemCount

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size (GB)" -Value ([math]::Round(($ArchiveStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Item Count" -Value $ArchiveStats.ItemCount

}
else {

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size (GB)" -Value "0"


}

$MailboxSizes += $ObjProperties

}

$MailboxSizes | Export-csv "C:\inboxsizes.csv" -NoTypeInformation

 

Thank you for your wonderful help!

Highlighted

Insert another line in between the Add-Member ones

 

 

Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "DisplayName" -Value $Mailbox.DisplayName

 

 

Highlighted

@Vasil Michev   Thanks again!!!!

 

For anyone wanting to know how it looks

 

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Set-ExecutionPolicy RemoteSigned
Enable-PSRemoting


Write-Host "Gathering Stats, Please Wait.."
$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, identity, ArchiveStatus
$MailboxSizes = @()
foreach ($Mailbox in $Mailboxes) {
$ObjProperties = New-Object PSObject
$MailboxStats = Get-MailboxStatistics $Mailbox.UserPrincipalname | Select DisplayName, LastLogonTime, TotalItemSize, ItemCount
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Display Name" -Value $MailboxStats.DisplayName
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "UserPrincipalName" -Value $Mailbox.UserPrincipalName
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Last Logged In" -Value $MailboxStats.LastLogonTime
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Mailbox Size (GB)" -Value ([math]::Round(($MailboxStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))

if ($Mailbox.ArchiveStatus -eq "Active") {
$ArchiveStats = Get-MailboxStatistics $Mailbox.UserPrincipalname -Archive | Select TotalItemSize, ItemCount
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size (GB)" -Value ([math]::Round(($ArchiveStats.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2))
}
else {
Add-Member -InputObject $ObjProperties -MemberType NoteProperty -Name "Archive Size (GB)" -Value "0"

}
$MailboxSizes += $ObjProperties
}
$MailboxSizes | Export-csv "C:\inboxsizes.csv" -NoTypeInformation

Get-PSSession | Remove-PSSession