Merging/Joining Get-aduser, Get-mailbox, and Get-mailboxstatistics

The other day, I was asked to provide an extract of all mailboxes in my exchange environment, along with attributes only available in other PS commands.

The below script provides the list (Get-Mailbox)along with a the sizes (Get-MailboxStatistics) and users’s associated dept(Get-User).

Hope it helps you.

Get-Mailbox -resultsize unlimited | sort-object | Select-Object DisplayName,PrimarySmtpAddress,@{n=”Size(KB)”;e = {$MBXstat = Get-MailboxStatistics $_.name; $MBXstat.totalItemsize}}, @{n=”ItemAcount”;e = {$MBXstat = Get-MailboxStatistics $_.name; $MBXstat.itemcount}},@{n=”Dept”;e={(get-aduser $_.name -properties department).department}} | export-csv mailboxout.csv

Windows 10 with Ubuntu now in public preview • The Register

Microsoft’s latest “Insider” Windows 10 preview Build 14316, includes now the Windows Subsystem for Linux along with a flurry of other new features.The addition of a Linux command-line to Windows was announced at Microsoft’s Build conference last week. The feature is aimed at developers, allowing them to use Linux utilities without having to run up a virtual machine or log into a remote system.Installing the Subsystem for Linux is a matter of first enabling Developer Mode, par of the Update and Security settings, and then selecting Linux from the Windows Features dialog. Once it is enabled, you can open a command prompt, type bash, and be prompted to install “Ubuntu on Windows”. The subsystem is then downloaded from the Windows Store.

Read on, source: Windows 10 with Ubuntu now in public preview • The Register