Appending signature to emails on Exchange Server 2010 with Powershell

November 14th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

With a new feature of Exchange Server 2010, now you can append signature or disclaimer messages to emails. You should create a new Transport rule to do this. Also there is an easy way to do this with Powershell:

New-TransportRule -Name 'Signatures' -Comments 'Signatures for Inside Organization' -Priority '0' -Enabled $true -FromScope 'InOrganization' 
-ApplyHtmlDisclaimerLocation 'Append' -ApplyHtmlDisclaimerText '</br></br>
<div style="font-size:11pt;  font-family: ''Calibri'',sans-serif;">
<div><img alt="yusufozturk"  src="http://www.yusufozturk.info/logo.png"></br>
</br></div>
%%displayname%%
</br>
MCSE+S
</br></div>' -ApplyHtmlDisclaimerFallbackAction 'Wrap'

I used %%displayname%% to add my name.

AddThis Social Bookmark Button

How to enter Exchange Server 2010 Product Key with Powershell?

November 11th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

If you don’t want to use Exchange Management Console, you can use Powershell:

Set-ExchangeServer -Identity '%Name%' -ProductKey '%ProductKey%'

So simple but important command for me :) You need to restart “Information Store” service.

AddThis Social Bookmark Button

Autodiscover configuration for Hosted Exchange 2010 on Powershell

November 9th, 2009 admin Posted in Exchange Server, Windows Powershell 3 Comments »

You need to create an Autodiscover directory in IIS and configure it. What I do with this script is creating that directory and configuring for redirection.

1
2
3
4
5
6
7
8
New-Item "C:\inetpub\Autodiscover_redirect" -type Directory
New-Item "C:\inetpub\Autodiscover_redirect\Autodiscover" -type Directory
New-Item "C:\inetpub\Autodiscover_redirect\Autodiscover\Autodiscover.xml"type File
Import-Module WebAdministration
Remove-WebBinding -Name “Default Web Site” -BindingInformation *:80:
New-ItemProperty IIS:\Sites\”Default Web Site” -name bindings -value @{protocol="http";bindingInformation="*:80:mail.yusufozturk.info"}
New-Item IIS:\Sites\Autodiscover -bindings (@{protocol="http";bindingInformation="*:80:"}) -PhysicalPath “C:\inetpub\Autodiscover_redirect"
Set-WebConfiguration -filter /system.webServer/httpRedirect -value (@{enabled="True"; destination="autodiscover.yusufozturk.info"}) -PSPath IIS:\ -location Autodiscover

You won’t get any SSL error on Outlook after changes.

AddThis Social Bookmark Button

How to enable Outlook Anywhere on Exchange Server 2010 with Powershell?

November 9th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

An easy way to enable Outlook Anywhere on Microsoft Exchange Server 2010 with Powershell:

Enable-OutlookAnywhere –ExternalHostname ‘mail.yusufozturk.info’ –SSLOffloading $false
-DefaultAuthenticationMethod ‘Basic’

You can set authentication method as Basic or NTLM.

AddThis Social Bookmark Button

Exchange 2010′a Powershell ile Send Connector ekleme

November 8th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

Bildiğiniz gibi ilk kurulum sonrası Exchange’i dışarıya açabilmek için Send Connector eklemeniz lazım. İşte otomatik kurulum gibi bir şey yapmak istiyor ya da en basitinden Exchange arabirimini kullanmak istemiyorsanız, Powershell deneyebilirsiniz. Microsoft Exchange Server 2010 Powershell Manager’a bağlanarak ya da Exchange Server Modülünü Powershell’e import ederek, aşağıdaki komutu çalıştırabilirsiniz.

New-SendConnector –Name ‘External’ –Usage ‘Internet’ –AddressSpaces ‘SMTP:*;1’
–DNSRoutingEnabled $true –UseExternalDNSServersEnabled $false –Fqdn ‘mail.yusufozturk.info’

FQDN’i belirlerken, external domain yazmanız gerektiğini unutmayın.

AddThis Social Bookmark Button

How to add receive connector to Exchange Server 2010 with Powershell?

November 8th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

You can’t receive email from external address if you don’t add receive connector to Exchange Server 2010. I will show you how you can easily add receive connector with Powershell:

Get-ReceiveConnector "Default *" | Set-ReceiveConnector 
-PermissionGroups:AnonymousUsers,ExchangeUsers,ExchangeServers

You may change “PermissionGroups”. Please use Get-help for extra information.

AddThis Social Bookmark Button

How to add send connector to Exchange Server 2010 with Powershell?

November 8th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

You can’t send email to external address if you don’t add send connector to Exchange Server 2010. I will show you how you can easily add send connector with Powershell:

New-SendConnector –Name ‘External’ –Usage ‘Internet’ –AddressSpaces ‘SMTP:*;1’
–DNSRoutingEnabled $true –UseExternalDNSServersEnabled $false –Fqdn ‘mail.yusufozturk.info’

You can modify name and fqdn. My FQDN is the external domain name of my Exchange Server 2010.

AddThis Social Bookmark Button

Exchange 2010 ile Yeni Nesil Mesajlaşma Etkinliği Sonrası

November 6th, 2009 admin Posted in Exchange Server No Comments »

Microsoft Exchange Server 2010 ile ilgili yapılmış ciddi bir etkinlik vardı bugün. Kişisel katılımın mümkün olduğu ve Microsoft Bellevue Residence’ta gerçekleştirilen etkinlikte çok sayıda BT çalışanının kişisel katılımının dışında, internet üzerinden canlı yayın da yapılarak, farklı şehirlerdeki BT çalışanlarının da etkinliği izleyebilmesi sağlanmış oldu.

Yaklaşık 3:30 saat süren etkinlikte, ilk olarak sahneye Microsoft MVP’si Baki Onur Okutucu çıktı ve Exchange Server 2010 ile ilgili bir Overview yaptı. Exchange Server 2010 ile birlikte gelen yeniliklerin altını çizen hocamız, high availability, güvenlik, owa yenilikleri ve outlook üzerine bir sunum yaptı. Özellikle “mail gönderememek” gibi basit fakat önemli bir konu üzerinden başladığı konuşmasını, high availability ile sonlandırarak, kendisine ayrılan 1 saatlik süreyi doldurmuş oldu.

Capture2

Sonrasında MSHowto’dan Sait Sadunoğlu, Exchange Server 2010 ile birlikte gelen client ve server taraflı yenilikleri anlattı. Exchange Control Panel (ECP), Role Based Access Control (RBAC), Rights Management Service (RMS), Delegation, Moderation, Multi Mailbox Search ile birlikte 5651 yasasına uygun olarak kullanılabilen raporlama sisteminin üzerinde duran Sait Bey, bizlere Exchange hakkında çok detaylı bilgiler vermiş oldu.

Capture

Son olarak sunum için sahneye çıkan Microsoft Exchange Server MVP’si Mümin Çiçek idi. Mümin Bey, Exchange 2010 ile birlikte gelen güvenlik geliştirmeleri hakkında detaylı bilgiler vererek, sunumu Microsoft Hyper-V üzerine kurulu olan test sunucuları üzerinde bir kaç demo yaparak bitirdi.

Kısacası tüm katılımcılar için çok doyurucu bir 3.5 saat idi ve Exchange Server ile ilgili aklımıza takılan tüm sorulara cevap bulmuş olduk. Dikkatimi çeken şey, artık Exchange’in yapamadığı bir şeyin kalmaması oldu. Özellikle Powershell üzerinden yapabilecekleriniz sayesinde, Exchange’i kendi sisteminize en uygun şekilde ayarlayabilmektesiniz.

exchange

Sunumda sevdiğim hocalardan bir tanesi olan Hakan Uzuner ile karşılaşmak benim için sevindirici bir gelişme oldu. Hakan Abi ile güzel bir sohbet yapabilme fırsatı yakaladım ve Exchange ile ilgili kafama takılan Failover Cluster senaryolarını çözüme kavuşturmuş olduk. Yine aynı şekilde sunum sırasında Sait Bey ile tanışma fırsatı bulduk ve kendisiyle de konuşabilme fırsatı yakaladım.

Etkinliğin kayıtlarına çok kısa bir süre sonra sitem üzerinden erişebilirsiniz.

AddThis Social Bookmark Button

How to import SSL certificate to Exchange Server 2010 with Powershell?

October 4th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

We generated a certificate request before. Now, we’ll import our SSL certificate to Exchange Server 2010 with Powershell.

Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path C:\Exchange.p7b
-Encoding byte -ReadCount 0)) -Password:(Get-Credential).password

As you see, we can’t use -Path command with Import-ExchangeCertificate anymore.

Importing SSL certificate in Exchange Server 2007:

Import-ExchangeCertificate -path C:\Exchange.p7b

If you try to execute Exchange Server 2007 command, you get this error:

A positional parameter cannot be found that accepts argument ‘-path’.
+ CategoryInfo : InvalidArgument: (:) [Import-ExchangeCertificate], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Import-ExchangeCertificate

After importing SSL certificate, you can use Enable-ExchangeCertificate to enable SSL on services.

AddThis Social Bookmark Button

New-ExchangeCertificate command has changed with Exchange 2010 Beta!

October 4th, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

This is a second shock after ServerManagerCMD for me. I don’t know why they changed it but there is no -Path switch anymore. We have to use Set-Content instead of -Path switch. When I use -Path switch with New-ExchangeCertificate, I get this error:

A positional parameter cannot be found that accepts argument ‘-Path’.
+ CategoryInfo : InvalidArgument: (:) [New-ExchangeCertificate], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,New-ExchangeCertificate

Generating CSR request in Microsoft Exchange Server 2007 with Powershell:

New-ExchangeCertificate -GenerateRequest -Path c:\Exchange.csr -KeySize 2048
-SubjectName "c=TR, s=Metrocity, l=Istanbul, o=Radore Hosting, ou=IT, cn=exchange.radore.net"

Generating CSR request in Microsoft Exchange Server 2010 with Powershell:

$CSR = New-ExchangeCertificate -GenerateRequest -KeySize 2048
-SubjectName "c=TR, s=Metrocity, l=Istanbul, o=Radore Hosting, ou=IT, cn=exchange.radore.net"
Set-Content -path "C:\Exchange.csr" -Value $CSR

Using a second command shouldn’t be necessery. I don’t know why they add Set-Content for this action.

AddThis Social Bookmark Button