Exchange Server 2010 – Gönderi limitleri belirleme (Powershell)

December 1st, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

Exchange Server 2010 üzerinde aşağıdaki function ile gönderi limitlerini belirleyebilirsiniz.

1
2
3
4
5
6
7
Function Maxsize-Limits
{
Param ($FirstName, $LastName, $CustomerOU, $MaxSendSize, $MaxReceiveSize)
     $ADDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
     $ADDomain = $ADDomain.Name
     Set-Mailbox –MaxSendSize "$MaxSendSize" -MaxReceiveSize "$MaxReceiveSize" -Identity "$ADDomainName/$CustomerOU/$FirstName $LastName"
}

Kullanımı:

Maxsize-Limits –FirstName "$FirstName" –LastName "$LastName" –CustomerOU "$CustomerOU" –MaxSendSize "10 MB" -MaxReceiveSize "10 MB"

Yukardaki komut sayesinde, kullanıcının alabileceği ve gönderebileceği maksimum mail boyutunu, 10 mb olarak belirlemiş durumdayız.

AddThis Social Bookmark Button

Exchange Server 2010 – Yeni mail adresleri tanımlama (Powershell)

December 1st, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

Exchange Server 2010 üzerinde aşağıdaki function ile kullanıcılara yeni mail adresleri tanımlayabilmekteyiz.

1
2
3
4
5
6
7
function Add-MailAddress
{
Param ($MailAddress, $FirstName, $LastName, $CustomerOU)
    $ADDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
    $ADDomain = $ADDomain.Name
    Set-Mailbox -EmailAddresses "SMTP:$MailAddress" -EmailAddressPolicyEnabled $false -Identity "$ADDomainName/$CustomerOU/$FirstName $LastName"
}

Kullanımı:

Add-MailAddress –MailAddress "$MailAddress" –FirstName "$FirstName" –LastName "$LastName" -CustomerOU "$CustomerOU"

Mail adresi tanımlama kısmında dikkat etmeniz gereken kısım SMTP olacaktır. SMTP’yi büyük harflerle yazmanız halinde, girilen mail adresi default; küçük harflerle yazılması halinde, girilen mail adresi ikincil mail adresi olacaktır. Örneğin bir kaç mail adresi tanımlanacaksa bir kullanıcıya aşağıdaki Powershell komutunu çalıştırmanız gerekecektir.

1
2
3
$ADDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$ADDomain = $ADDomain.Name
Set-Mailbox -EmailAddresses "SMTP:$MailAddress1", "smtp:$MailAddress2", "smtp:$MailAddress3" -EmailAddressPolicyEnabled $false -Identity "$ADDomainName/$CustomerOU/$FirstName $LastName"

Yukarda görüldüğü gibi $MailAddress1 kullanıcının default reply adresi olacak, diğer mail adresleri ise kullanabileceği ikincil adresler olacaktır.

AddThis Social Bookmark Button

Exchange Server 2010 – Mail Hesabı Ekleme işlemi (Powershell)

December 1st, 2009 admin Posted in Exchange Server, Windows Powershell No Comments »

Exchange Server 2010 üzerinde aşağıdaki function ile mail hesabı yaratabilirsiniz.

1
2
3
4
5
6
7
function Add-MailUser
{
Param ($UserID, $FirstName, $LastName, $CustomerOU)
    $ADDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
    $ADDomainName = $ADDomain.Name
    Enable-Mailbox -Identity "$ADDomainName/$CustomerOU/$FirstName $LastName" -Alias "$UserID"
}

Kullanımı:

Add-MailUser –UserID "$UserID" –FirstName "$FirstName" –LastName "$LastName" -CustomerOU "$CustomerOU"

Function dosyası kullanmamızın en büyük faydası, mail hesabını daha hızlı bir şekilde açmak olacaktır.

AddThis Social Bookmark Button

Creating a new mailbox with Powershell function on Exchange Server 2010

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

I wrote a function for Hosted Exchange 2010 to create a new mailbox on Exchange Server 2010.

1
2
3
4
5
6
7
function Add-MailUser
{
Param ($UserID, $FirstName, $LastName, $CustomerOU)
    $ADDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
    $ADDomainName = $ADDomain.Name
    Enable-Mailbox -Identity "$ADDomainName/$CustomerOU/$FirstName $LastName" -Alias "$UserID"
}

Usage of function:

Add-MailUser –UserID “2452” –FirstName “Yusuf” –LastName “Ozturk” -CustomerOU “Users”

I used System.Directory.Services to get Active Directory domain. Lets see how does it work:

dservices

CustomerOU is the base of your user container. Just type your OU name like “Exchange” or “Users”.

AddThis Social Bookmark Button

Exchange Server 2010′da imzalara ekleyebileceğiniz ADAttribute’lar

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

Exchange Server 2010 ile birlikte gelen yeni bir özellik sayesinde artık maillere otomatik imza eklenebildiğini söylemiş ve nasıl ekleyebileceğinizle ilgili örnek bir Powershell kodu eklemiştim. Şimdi o kodda kullanabileceğiniz diğer ADAttribute’ları ekliyorum.

%%DisplayName%%
%%FirstName%%
%%Initials%%
%%LastName%%
%%Office%%
%%PhoneNumber%%
%%OtherPhoneNumber%%
%%Email%%
%%Street%%
%%POBox%%
%%City%%
%%State%%
%%ZipCode%%
%%Country%%
%%UserLogonName%%
%%HomePhoneNumber%%
%%OtherHomePhoneNumber%%
%%PagerNumber%%
%%MobileNumber%%
%%FaxNumber%%
%%OtherFaxNumber%%
%%Notes%%
%%Title%%
%%Deparatment%%
%%Company%%
%%Manager%%
%%CustomAttribute1%%
%%CustomAttribute15%%

HTML kullanabildiğiniz için yukardaki Attribute’ları istediğiniz gibi yerleştirerek, güzel bir imza oluşturabilirsiniz.

AddThis Social Bookmark Button

Exchange Server 2010′da maillere Powershell ile otomatik imza ekleme

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

Exchange Server 2010 ile birlikte gelen yeni özelliklerden bir tanesi de maillere artık otomatik imza eklenebiliyor olması. Active Directory içersinden kullanıcı bilgilerini çekerek, imzalara basmanız, şirket logonuzu yerleştirmeniz mümkün. Transport rule altında bulacağınız imza ekleme kuralını, daha hızlı ve kolay bir şekilde yapabilmeniz için Powershell komutlarını gösteriyorum.

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'

İmzalarda isim soyisim çıkması için %%displayname%% kullandım. İmzalarda kullanabileceğiniz kullanıcı bilgilerini diğer postta belirteceğim.

AddThis Social Bookmark Button

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