Die wichtigsten Exchange 2007 Befehle
Hallo zusammen,
Im Testlab habe ich Exchange 2007 installiert und mal versucht alles per CMD oder CMDlets zu konfigurieren. Hier sind nun also die wichtigsten Exchange 2007 befehle.
Install Prerequisits (Win 2008)
http://technet.microsoft.com/en-us/library/bb691354(EXCHG.80).aspx
ServerManagerCmd -i PowerShell
ServerManagerCmd -i Web-Server
ServerManagerCmd -i Web-ISAPI-Ext
ServerManagerCmd -i Web-Metabase
ServerManagerCmd -i Web-Lgcy-Mgmt-Console
ServerManagerCmd -i Web-Basic-Auth
ServerManagerCmd -i Web-Digest-Auth
ServerManagerCmd -i Web-Windows-Auth
ServerManagerCmd -i Web-Dyn-Compression
ServerManagerCmd -i RPC-over-HTTP-proxy
Install
Nun kann Install Exchange 2007 installiert werden
Finalize Deployment
Set-TransportServer Northwind01 -ExternalPostmasterAddress postmaster@northwind.com
New-AcceptedDomain -Name "Northwind" -DomainName northwind.com -DomainType Authoritative
New-SendConnector -Name "Outgoing SMTP" -AddressSpaces *
Certificates
http://technet.microsoft.com/en-us/library/aa995942.aspx
New-ExchangeCertificate -generaterequest -subjectname "CN=mail.northwind.com,OU=IT Department, O=Northwind Traders,L=Bern,S=BE,C=CH" -domainname mail.northwind.com, NORTHWIND01,NORTHWIND01.northwind.com, autodiscover.northwind.com -PrivateKeyExportable $true -path c:\northwind_certreq.txt
Der obenstehende Befel erzeugt einen Certificate Signing Request (CSR) für ein Zertifikat mit Subject Alternative Names (SAN) mit den folgenden Domains.
mail.northwind.com
NORTHWIND01
NORTHWIND01.northwind.com
autodiscover.northwind.com
Nach dem Austellen eines Zertifikats bei einer Zertifizierungstelle (CA) erhält man dann ein Zertifikat.
Import-ExchangeCertificate -path C:\Northwind01.cer -friendlyname "mail.northwind.com"
Enable-ExchangeCertificate -thumbprint 6556A81B56C996FA918178ABC0C17DB8A0A2AB41 -services "SMTP,IIS,POP,IMAP"
Setzen der Public URLs
Enable-OutlookAnywhere -Server NORTHWIND01 -ExternalHostname "mail.northwind.com" -DefaultAuthenticationMethod "Basic" -SSLOffloading:$False
Set-OABVirtualDirectory -identity "NORTHWIND01\OAB (Default Web Site)" -externalurl https://mail.northwind.com/OAB -RequireSSL:$true
Set-WebServicesVirtualDirectory -identity "NORTHWIND01\EWS (Default Web Site)" -externalurl https://mail.northwind.com/EWS/Exchange.asmx -BasicAuthentication:$True
Set-OwaVirtualDirectory -identity "NORTHWIND01\owa (Default Web Site)" -externalurl https://mail.northwind.com/owa
Set-ActiveSyncVirtualDirectory -identity "NORTHWIND01\Microsoft-Server-ActiveSync (Default Web Site)" -externalurl https://mail.northwind.com/Microsoft-Server-ActiveSync
Users und Groups
New-Mailbox -FirstName Hans -LastName Muster -Name "Hans Muster" -Database "Mailbox Database" -UserPrincipalName h.muster@contoso.com
New-DistributionGroup -Name "Managers" -SAMAccountName "Managers" -Type "Distribution"
Add-DistributionGroupMember -Identity "Managers" -Member "Hans Muster"
New-MailContact -Name "Andres Bohren" -ExternalEmailAddress a.bohren@example.com
Wenn das AD Objekt in einer bestimmten OU angelegt werden soll, dann muss der -OrganizationalUnit Parameter angegeben werden.
New-Mailbox -FirstName Fritz -LastName Fischer -Name "Fritz Fischer" -Database "Mailbox Database" -UserPrincipalName f.fischer@contoso.com -OrganizationalUnit "Messaging"
New-DistributionGroup -Name "Marketing" -SAMAccountName "Marketing" -Type "Distribution" -OrganizationalUnit "Messaging"
Add-DistributionGroupMember -Identity "Marketing" -Member "Fritz Fischer"
Mailflow
Get-Queue
Get-Message | fl
Get-MessageTrackingLog -Start "13.03.2010 21:00"
General CMDlets
Get-ExchangeServer
Get-MailboxDatabase
Get-Mailbox -Identity h.muster | fl
Get-MailboxStatistics -Identity "Hans Muster"
Test-ServiceHealth
Test-Mailflow
Test-MAPIConnectivity
Test-OutlookWebServices