if you want to export all you mailboxes sizes to CSV/Excel, you can run this command in you powershell:
get-mailbox | get-mailboxstatistics | select-object displayname, itemcount, totalitemsize | export-csv c:\mailbox-size.txt
if you want to export all you mailboxes sizes to CSV/Excel, you can run this command in you powershell:
get-mailbox | get-mailboxstatistics | select-object displayname, itemcount, totalitemsize | export-csv c:\mailbox-size.txt
New-ReceiveConnector -Name RelayConnector -usage Custom -Bindings ’192.168.1.10:25′ -fqdn server.domain.com -RemoteIPRanges 192.168.1.20 -server MYEXCHANGESERVER -permissiongroups ExchangeServers -AuthMechanism ‘TLS, ExternalAuthoritative’
The easist way is just to run this command in powershell:
Where:
192.168.1.10:25 is the IP address of the Exchange server
192.168.1.20 is the ip of the clients how need access to relay
server.domain.com is you exchange server FQDN
MYEXCHANGESERVER is you exchange server hostname
If you want to change Autodiscover / EWS / OAB / OWA / ECP / Activesync Url, this is how it works
Set-WebServicesVirtualDirectory -Identity “SERVERNAME\EWS (Default Web Site)” -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true Set-AutoDiscoverVirtualDirectory -Identity "SERVERNAME\Autodiscover (Default Web Site)" -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml set-OabVirtualDirectory -identity "SERVERNAME\OAB (Default Web Site)" -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB set-EcpVirtualDirectory -identity "SERVERNAME\ecp (Default Web Site)" -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp set-OwaVirtualDirectory -identity "SERVERNAME\owa (Default Web Site)" -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa set-ActiveSyncVirtualDirectory -identity "SERVERNAME\Microsoft-Server-ActiveSync (Default Web Site)" -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync Set-ClientAccessServer -Identity "SERVERNAME" –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml
Or if this is a single server installation you can do it like this:
get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true get-AutoDiscoverVirtualDirectory | Set-AutoDiscoverVirtualDirectory -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml get-OabVirtualDirectory | set-OabVirtualDirectory -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB get-EcpVirtualDirectory | set-EcpVirtualDirectory -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp get-OwaVirtualDirectory | set-OwaVirtualDirectory -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa get-ActiveSyncVirtualDirectory | set-ActiveSyncVirtualDirectory -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync get-ClientAccessServer | Set-ClientAccessServer –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml
I was returing to an older snapshot of my Exchange servers. But when i want to logon to the Exchange server, it came with “Trust relationship has been lost with domain controller”.
Normally you just rejoin the domain, but this is not a good idea, when there is installed Exchange services on it.
I fix this with netdom.
Logon to the Exchange with a locally logon account.
Start command with Administrator rights
Type: netdom /RESETPWD /server:DOMAINCONTROLLER /UserD:DOMAINNAME\ACCOUNTNAME /PasswordD:PASSWORD OR *
Here is a script, that runs though you Exchange server, and return all permission on all folders in all mailboxes.
The script needs to be running from the Exchange management Shell, and will create a subfolder in c:\ call ExchangeMailboxPermission, where it will create a text file for all yours mailboxes.
#This script will return all permissions on all folders #in all mailboxes # #Written by Kenneth Dalbjerg - http://www.kennethdalbjerg.dk # $FolderPath = 'C:\ExchangeMailboxPermission\' if ((Test-Path -path $FolderPath) -ne $True) { New-Item $FolderPath -type directory } $mailboxes = get-mailbox -resultsize unlimited foreach ($mailbox in $mailboxes) { $alias = $mailbox.DistinguishedName $username = $mailbox.SamAccountName $SpecialExchangeFolders = "Top of Information Store|Recoverable Items|Deletions|Purges|Versions" $mailboxfolderes = Get-MailboxFolderStatistics -folderscope all -identity $alias | where { $_.name-notmatch $SpecialExchangeFolders } $File = $FolderPath + '\' + $username + '.txt' $mailboxfolderes | foreach { $folder = $username + ':' + $_.folderpath -replace "/","\" echo $folder Get-MailboxFolderPermission -identity $folder } | Out-file $File }
To get a CSV file, from you exchange with full access and send as permission, from all you mailboxes run these commands:
Full Access
Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Select Identity,User,@{Name=’Access Rights’;Expression={[string]::join(‘, ‘, $_.AccessRights)}} | Export-Csv -NoTypeInformation c:\mailboxpermissions.csv
Send As
Get-Mailbox | Get-ADPermission | where { ($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select Identity, User, Deny | Export-CSVc:\sendas.csv
Get-Mailbox -id KennethDalbjerg | select-expand EmailAddresses | %{$_.SmtpAddress}
I have this problems that i could delete a routinggroup between an old Exchange 2003 and a new Exchange 2010.
When i type Get-RoutingGroupConnector
Name SourceRoutingGroup TargetRoutingGroup
—- —————— ——————
RG-Exchange Exchange Routing Group (DWBGZMFD01QNBJR) First Routing Group
RG-Exchange First Routing Group Exchange Routing Group (DWBGZMFD01QNBJR)
So i have 2 Routinggroup Connector with the same name. So when i type
Remove-RoutingGroupConnector -id “RG-Exchange”
I got
The operation couldn’t be performed because ‘rg-exchange’ matches multiple entries.
+ CategoryInfo : NotSpecified: (0:Int32) [Remove-RoutingGroupConnector], ManagementObjectAmbiguousExcepti
on
+ FullyQualifiedErrorId : 6C29C43B,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveRoutingGroupConnec
tor
So all i did was typing this instead:
get-routinggroupconnector -id “RG-Exchange” | remove-routinggroupconnector
Then it will ask you if you want to delete all routingsgroup with the name “RG-Exchange”
Hello
If you have Internet Explorer 9 and TMG / UAG installed on the same machine you need to apply this patch, else you will get:
file:///C:/Program%20Files/Microsoft%20Forefront%20Threat%20Management%20Gateway/UI_HTMLs/Generic.htm?guid=%7B1FC3773B-C941-450C-BA39-224904EFD093%7D
GET-MAILBOX * | where { $_.PrimarySMTPAddress.Domain -eq ‘kennethdalbjerg.dk’ }