Created
March 29, 2018 22:59
-
-
Save tostka/efad264864d4dc70cc1e3918f57c02d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# all mailboxes in a site Ex10 EMS query #> | |
# one-line follows | |
get-exchangeserver | | |
where { $_.IsMailboxServer -eq $true -AND $_.Site -like '*SiteA*' -AND $_.admindisplayversion.major -eq 14 } | | |
get-mailboxdatabase | | |
where {$_.ReplicationType -eq "Remote"} | | |
get-mailbox -resultsize unlimited | | |
select samaccountname,DisplayName,Alias, Office,WindowsEmailAddress, @{Name='Addresses';Expression={[string]::join(";", ($_.EmailAddresses))}}, Database,ServerName,IsResource,IsLinked,IsShared, UseDatabaseQuotaDefaults,IssueWarningQuota, ProhibitSendQuota,ProhibitSendReceiveQuota, ArchiveDatabase,ArchiveGuid,ArchiveName, ArchiveQuota,ArchiveWarningQuota,WhenMailboxCreated, HasPicture,HasSpokenName,OrganizationalUnit, LegacyExchangeDN,PrimarySmtpAddress,RecipientType, RecipientTypeDetails,RequireSenderAuthenticationEnabled, SimpleDisplayName,ExchangeVersion,Name,DistinguishedName, Guid,ObjectCategory,WhenChanged,WhenCreated | | |
export-csv .\Ex2010-mbx-users.csv -notype ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gisting up antique blog post code from circa 2013