In exchange powershell :

# Configure Virtual Directories for the “Default Web Site”

Set-WebServicesVirtualDirectory -Identity Exch2007\"EWS (Default Web Site)" -InternalUrl -ExternalUrl
Set-OabVirtualDirectory -Identity Exch2007\"OAB (Default Web Site)" -InternalUrl -ExternalUrl -RequireSSL:$True
Set-UMVirtualDirectory -Identity Exch2007\"UnifiedMessaging (Default Web Site)" -InternalUrl -ExternalUrl
Set-OWAVirtualDirectory -Identity Exch2007\"OWA (Default Web Site)" -InternalURL -ExternalUrl -LogonFormat username -DefaultDomain
# Set URL for AutoDiscover
Set-ClientAccessServer -Identity Exch2007 -AutodiscoverServiceInternalURI -AutodiscoverSiteScope:$null
Set-AutoDiscoverVirtualDirectory -identity Exch2007\"Autodiscover (Default Web Site)" -InternalUrl -ExternalUrl
# Reset IIS

Ref :
Tagged with:  
  • Get-MoveRequest -movestatus completed | remove-moverequest
Tagged with:  
  • The minimum result size is 1000, so if you have more user then we need to add the switch -resultsize
Get-Mailbox -resultsize unlimited | select name,database | export-csv "c:\mailboxperdatabase2.csv"
Tagged with:  

I didn’t do this script, i’ve just adapt it to the way we work :

I’ve simplify a lot the original script to make this beauty, the only thing remaining is to fill the 3 variables at the start :

$InternalName = ""
$ExternalName = $InternalName
$ExServer = "ServerNameHere"

Get-WebservicesVirtualDirectory -Server $ExServer | Set-WebservicesVirtualDirectory -InternalURL https://$InternalName/EWS/Exchange.asmx -ExternalURL https://$externalName/EWS/Exchange.asmx
Get-OwaVirtualDirectory -Server $ExServer | Set-OwaVirtualDirectory -InternalURL https://$InternalName/owa -ExternalURL https://$ExternalName/owa
Get-ecpVirtualDirectory -Server $ExServer | Set-ecpVirtualDirectory -InternalURL https://$InternalName/ecp -ExternalURL https://$ExternalName/ecp
Get-ActiveSyncVirtualDirectory -Server $ExServer | Set-ActiveSyncVirtualDirectory -InternalURL https://$InternalName/Microsoft-Server-ActiveSync -ExternalURL https://$ExternalName/Microsoft-Server-ActiveSync
Get-OABVirtualDirectory -Server $ExServer | Set-OABVirtualDirectory -InternalUrl https://$InternalName/OAB -ExternalURL https://$ExternalName/OAB
Set-ClientAccessServer $ExServer -AutodiscoverServiceInternalUri https://$internalName/Autodiscover/Autodiscover.xml
Set-OutlookAnywhere -Identity “$ExServer\Rpc (Default Web Site)” -InternalHostname $internalName -ExternalHostName $ExternalName -InternalClientAuthenticationMethod ntlm -InternalClientsRequireSsl:$True -ExternalClientAuthenticationMethod Basic -ExternalClientsRequireSsl:$True

Write-Host “Vdirs have been set to the following..” -Foregroundcolor Green
Write-Host “$ExServer EWS”
Get-WebservicesVirtualDirectory -Server $ExServer |Fl internalURL,ExternalURL
Write-Host “$ExServer OWA”
Get-OWAVirtualDirectory -Server $ExServer | Fl internalUrl,ExternalURL
Write-Host “$ExServer ECP”
Get-ECPVirtualDirectory -Server $ExServer | Fl InternalURL,ExternalURL
Write-Host “$ExServer ActiveSync”
Get-ActiveSyncVirtualDirectory -Server $ExServer | Fl InternalURL,ExternalURL
Write-Host “$ExServer OAB”
Get-OABVirtualDirectory -Server $ExServer | Fl InternalURL,ExternalURL
Write-Host “$ExServer Internal Autodiscover URL”
Get-ClientAccessServer $ExServer | Fl AutodiscoverServiceInternalUri
Write-Host “$Exserver Outlook Anywhere Settings”
Get-OutlookAnywhere -Identity “$ExServer\rpc (Default Web Site)” |fl internalhostname,internalclientauthenticationmethod,internalclientsrequiressl,externalhostname

As you can see, i’m using the same on the internal and external URL, the reason is simple, we hate working to much and using the same mean just one single certificate can do the job in and out !

Tagged with:  

Sorry, this entry is only available in Français.

Tagged with:  

Do to so, we need to combine 2 commands and here we go !

get-MoveRequest | get-MoveRequestStatistics


Tagged with:  

How to uninstall Exchange 2010

On 20 January 2014, in Exchange 2010, IT Procedure, Servers, by Himselff
  • En powershell vous devez retirer les “Arbitration Mailbox” par la commande suivante :

get-mailbox -database 'Your Mailbox Database' -arbitration | remove-mailbox -arbitration -removelastarbitrationmailboxallowed

  • Toujours en powershell vous devez retirer les boites normales égallement avec la commande suivante : (Si vous possédez un autre serveur exchange dans l’organisation vous pouvez aussi faire des move-mailbox)

get-mailbox -database 'Your Mailbox Database' | remove-mailbox

Note : vous ne pouvez supprimer votre propre mailbox, vous devez soit la déplacer ou la désactiver !

  • Pour poursuivre la désinstallation , il faut retirer les connecteurs :
Remove-RoutingGroupConnector -Identity"[[Administrative Group Name\]Routing Group Name]\Routing Group Connector Name"

Tagged with:  
Tagged with:  
  • In powershell type the following command to load the module :

Import-Module BitsTransfer
Import-Module ServerManager

  • Launch the module install :
Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation,RSAT-Clustering-CmdInterface -restart
  • We also need to make sure the user you are goiing to use is member of “Schema admin” and “Enterprise Admin”
  • The last step is to validate that there is no Exchange 2000 or 2003 in the organisation, if so they need to be remove properly prior !
Tagged with:  
  • Open Powershell in admin mode
  • Type the command : “Import-Module ServerManager”

  • Under Windows 2008R2
    • Type the following command to install the prerequist : “Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,Web-Asp-Net,Web-Client-Auth,Web-Dir-Browsing,Web-Http-Errors,Web-Http-Logging,Web-Http-Redirect,Web-Http-Tracing,Web-ISAPI-Filter,Web-Request-Monitor,Web-Static-Content,Web-WMI,RPC-Over-HTTP-Proxy,Desktop-Experience -Restart”
  • Under Windows 2012
    • Type the following commande first : “Install-WindowsFeature NET-Framework-Core,PowerShell-V2″
    • Then to install the remaining : “Install-WindowsFeature Telnet-Client,RSAT-ADDS, RSAT-Clustering,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Request-Monitor,Web-Static-Content,Web-Mgmt-Console,Web-Lgcy-Mgmt-Console,Web-WMI,WAS-Process-Model,Web-Asp-Net,Web-Client-Auth,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Http-Errors,Web-Http-Logging,Web-Http-Redirect,Web-Http-Tracing,Web-Digest-Auth,Web-Dir-Browsing,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Desktop-Experience –Restart”

  • The server will reboot once installation are complete
  • Change the service “Net. TCP Port Sharing” startup in automatic mode

  • Install “Filter pack for Office 2010” on the server, available here :
  • If you wich to install a DAG you must add the Windows Server Feature “Failover Clustering” withtout any configuration, wich will force Exchange to register it’s DLL in cluster mode, under Windows 2008 we need at least version “Entreprise”, under Windows 2012 the feature is available in the Standard version since the Enterprise version has been discontinued.
Tagged with: