728x90

1. 메일 사용량이 많은경우

2. 메일 수발신 용량을 기본 조직전송값인 10mb 에서 더 큰값으로 변경해준 경우
3. 다수의 사용자에게 큰 사이즈의 첨부파일 전송 사용이 많을경우

세가지 조건이 겹치는 경우 버전버킷 임계치를 초과하여 백프레셔 현상이 일어남
백프레셔가 나는 경우 메일 전송이 30분에서 ~ 1시간 까지도 지연현상이 발생할수 있음

[해결방법]
EdgeTransport.exe.config 항목의 
VersionBuckets High/Medium/Normal Threshold 값을 적절하게 조절함
기본수치는 200/120/80 이나 서버 사양, 사용량에 따라 500/450/400 정도로 조절해도 무방함

더 정확하게 조절하려면 별도의 버전버킷 계산식 및 Perf 로그상의 실제 버전버킷 카운터를 주기적으로 모니터링 하는것이 필요


728x90
728x90

#requires -version 3.0

 

#remote computers must be running PowerShell 3.0

 

$computers = "dc01","ex16","c1","ex10"    -- 서버명

$cred = Get-Credential "mani4u\administrator"   -- 관리자암호

$eventlog = "Application"     -- 추출 할 이벤트로그명

 

invoke-command -ScriptBlock {

  $log = get-wmiobject win32_nteventlogfile -filter "logfilename = '$using:eventlog'"

  $file = "{0}_{1}_{2}.evtx" -f (get-date -f "yyyyMMdd"),$log.CSName,$log.FileName.Replace(" ","")

 

  #map a PSDrive with credentials

  New-PSDrive -name B -PSProvider Filesystem -Root \\ex10\it -Credential $using:cred | Out-Null  --지정서버명\공유폴더명

 

  #backup path must be something Windows can see like a UNC

  $backup = join-path (get-psdrive B).root $file

  write-host "Backing up to $backup" -ForegroundColor cyan

  $r = $log | Invoke-WmiMethod -Name BackupEventlog -ArgumentList $backup

  if ($r.returnValue -eq 0) {

    Get-Item $backup

  }

  else {

   Throw "Backup failed with returnvalue $($r.returnvalue)"

  }

 

 } -ComputerName $computers

728x90
728x90

서비스 재시작

#Get List of Microsoft Exchange Services

$services = Get-Service | ? { $_.name -like "MSExchange*" -and $_.Status -eq "Running"}

 

#Restart each service

foreach ($service in $services)

{

Restart-Service $service.name -Force

} 





중지 된 서비스 시작

#Get List of Microsoft Exchange Services

$services = Get-Service | ? { $_.name -like "MSExchange*" -and $_.Status -eq "Stopped"}

 

#Restart each service

foreach ($service in $services)

{

Restart-Service $service.name -Force

} 


728x90
728x90

아래를 잘 할용해서 Mail까지 보낼수 있을 듯하다.

코드

 $freespace = Get-WmiObject -Class Win32_logicalDisk | ? {$_.DriveType -eq '3'}

$drive = ($FreeSpace.DeviceID).Split("=")
#"Your $drive Free Space Percentage is {0:P2}" -f ($freespace.FreeSpace / $freespace.Size)
 
[String]::Format("Your $Drive Free Space Percentage is {0:P2}" -f ($freespace.FreeSpace / $freespace.Size))




728x90
728x90

1. Server Load Balancing 의 필요성
2. Server Load Balancing 의 이해
3. Server Load Balancing 기본구성
4. Terminology
5. Load Balancing Algorithm
6. Server Load Balancing Processing
7. Server Load Balancing Configuration
8. Information / Statistics View
9. 점검사항
10. Redundancy SLB 구현사례

1. Server load Balancing의 필요성
Internet Server Traffic 의 급증
- Internet 응답속도 지연
- Server 효율성 저하
- Service 신뢰성 상실

Internet Traffic 극복
- Server Load Balancing 필요성 제기

2. Server load Balancing의 이해
기존 Server Load Balancing 방법
- DNS Round-Robin을 이용한 Server Load Balancing

L4를 통한 Server Load Balancing
- TCP session관리가 Layer 4 장비를 통하여 가능하게 됨에 따라 다양하고
확실한 Load Balancing 구현
- Client가 웹 브라우저 상에서 URL을 입력하여 DNS로 하여금 얻어지는
Ip address값 (L4에서는 Virtual IP :VIP 이라고 말한다.) 을 통하여 L4의
Virtual Server로 접속.
- Virtual Serve의r로 접속하게된 http request는 Vip로 mapping되어있는 실제
서버(real server) Group matching.
- Server group으로 Matching 시키는 기법은 L4가 가지고 있는 여러 가지
분산 알고리즘에 의해 작동하게 되는데 사이트의 성격에 따라 알맞게
선택.

3. Server Load Balancing의 기본구성

4. Terminology

Client ports
- Client processing을 적용할 수 있는 switch port
- 각각의 session을 server로 할당 / VIP를 RIP로 변환

Server ports
- Server processing을 적용할 수 있는 switch port / RIP를 VIP로 변환

Health Check
- Server의 이상유무를 수시로 점검하는 기능 ( http, tcp, ftp, icmp ...)

5. Load Balancing Algorithm

Round Robin
- Real server로 session을 순차적을 맺어주는 방식

Least Connection
- real server의 open 세션 수를 고려한 다음, 가장 적은 수의 open session을 가진 real server로 session을 맺어 주는 방식.

- 각 real server들이 서로 상이한 resource와 connection에 부수되는 시간과 데이터 양이 서로 다른 환경에서 활용할 수 있다.



Hash
- Clients와 Server 간에 한번 성립된 session을 계속해서 유지해 주는 방식으로 특정 client는 특정 server로만 접속하게 된다.
- 이 방식은 clients source IP address (32 bit) 값을 real server의 대수로 나눈 나머지 값으로 connection할 server 결정

Minimum Missies
- Hash Algorithm과 거의 유사

- 역시 clients source IP address (32 bit) 값을 real server의 대수로 나눈 나머지 값으로 connection할 server 결정

- 그러나, 이 Algorithm은 Cache Redirection에 주로 사용하도록 권장

6. Server Load Balancing processing
Client Processing

- VIP (Virtual IP address)를 RIP (Real IP address)로 변환하는 작업

Server Processing

- RIP (Real IP address)를 VIP (Virtual IP address)로 변환하는 작업

7. Server Load Balancing Configuration

Alteon L4 command
[Main Menu] ; L4 booting시 최초 menu
info - Information Menu
stats - Statistics Menu
cfg - Configuration Menu
oper - Operations Command Menu
boot - Boot Options Menu
maint - Maintenance Menu
diff - Show pending config changes [global command]
apply - Apply pending config changes [global command]
save - Save updated config to FLASH [global command]
revert - Revert pending or applied changes [global command]
exit - Exit [global command, always available]
>> Main#

interface IP address / mask / broad

>> Main# /cfg/ip/if 1
------------------------------------------------------------
[IP Interface 1 Menu]
addr - Set IP address
mask - Set subnet mask
broad - Set broadcast address
ena - Enable IP interface
cur - Display current interface configuration

>> IP Interface 1# ma 255.255.255.128/addr 210.219.67.120/broad 210.219.67.127/ena

>> IP Interface 1# cur
Current interface 1:
210.219.67.120, 255.255.255.128, 210.219.67.127, vlan 1, enabled

default gateway

>> IP Interface 1# /cfg/ip/gw 1
------------------------------------------------------------
[Default gateway 1 Menu]
addr - Set IP address
ena - Enable default gateway
cur - Display current default gateway configuration

>> Default gateway 1# addr 210.219.67.128/ena

>> Default gateway 1# cur
Current default gateway 1:
addr 210.219.67.126, intr 2, retry 8, arp disabled, enabled


? Real Ip address

>> Default gateway 1# /cfg/slb/re 1
[Real server 1 Menu]
rip - Set IP addr of real server
ena - Enable real server
cur - Display current real server configuration

>> Real server 1 # rip 210.219.67.121/ena
>> Real server 1 # ../re 2
>> Real server 2 # rip 210.219.67.122/ena
>> Real server 2 # ../re 3
>> Real server 3 # rip 210.219.67.123/ena


Group / Metric / Health Check

>> Real server 3 # /cfg/slb/gr 1
------------------------------------------------------------
[Real server group 1 Menu]
metric - Set metric used to select next server in group
health - Set health check type
add - Add real server
cur - Display current group configuration

>> Real server group 1# add 1/add 2/add 3/metric leastconn/health tcp

>> Real server group 1# cur
Current real server group 1:
name , metric leastconns, backup none, realthr 0
health tcp, content
real servers:

1: 210.219.67.121, enabled, name , weight 1, timeout 10, maxcon 200000
backup none, inter 2, retry 4, restr 8

2: 210.219.67.122, enabled, name , weight 1, timeout 10, maxcon 200000
backup none, inter 2, retry 4, restr 8

3: 210.219.67.123, enabled, name , weight 1, timeout 10, maxcon 200000
backup none, Inter 2, retry 4, restr 8
remote disabled, proxy enabled, submac disabled


Vitual Ip address / Virtual port / group

>> Default gateway 1# /cfg/slb/vi 1
------------------------------------------------------------
[Virtual Server 1 Menu]
service - Virtual Service Menu
vip - Set IP addr of virtual server
ena - Enable virtual server
cur - Display current virtual configuration

>> Virtual Server 1# vip 210.219.67.124/ena
>> Virtual Server 1# service
Enter virtual port: 80
------------------------------------------------------------
[Virtual Server 1 http Service Menu]
group - Set real server group number
cur - Display current virtual service configuration
>> Virtual Server 1 http Service# gr 1
Current real server group: 1
New pending real server group: 1

>> Virtual Server 1# ../cur
Current virtual server 1:
0.0.0.0, disabled, ftpp disabled
virtual ports:
http: rport http, group 1, frags
real servers:
1: 210.219.67.121, weight 1, enabled, backup none
2: 210.219.67.122, weight 1, enabled, backup none
3: 210.219.67.123, weight 1, enabled, backup none

Client processing, server processing

>> Layer 4# po 1
------------------------------------------------------------
[SLB port 1 Menu]
client - Enable/disable client processing
server - Enable/disable server processing
cur - Display current port configuration

>> SLB port 1# client enable
>> SLB port 1# ../po 2
>> SLB port 2# server enable
>> SLB port 2# ../po 3
>> SLB port 3# server enable
>> SLB port 3# ../po 4
>> SLB port 4# server enable


SLB on/off

>> SLB port 4# /cfg/slb/
>> Layer 4# .
------------------------------------------------------------
[Layer 4 Menu]
real - Real Server Menu
group - Real Server Group Menu
virt - Virtual Server Menu
filt - Filtering Menu
port - Layer 4 Port Menu
gslb - Global SLB Menu
url - URL Resource Definition Menu
sync - Config Synch Menu
adv - Layer 4 Advanced Menu
on - Globally turn Layer 4 processing ON
off - Globally turn Layer 4 processing OFF
cur - Display current Layer 4 configuration

>> Layer 4# on

Information / statistics View - Telnet or Console

; Server Load Balancing을 위한 Setting이 끝난 후에 Telnet / Console / Web Browser를 통하여 다양한 정보를 확인할 수 있다.

Link Information
; 각 port의 link상태를 확인할 수 있다.
>> Information# li
------------------------------------------------------------------
Port Speed Duplex Flow Ctrl Link
---- ----- -------- --TX-----RX-- ------
1 100* full* yes yes up
2 100 full yes yes up
3 100 full yes yes up
4 100 full yes yes up
5 100 full yes yes up
6 10/100 any yes yes down
7 10/100 any yes yes down
8 10/100 any yes yes down
* = value set by configuration; not autonegotiated.

ARP Information
; port에 물려있는 장비들의 Mac address값을 확인 할 수 있다.

>> Information / Address Resolution Protocol# d
IP address Flags MAC address VLAN Port Referenced ports
--------------- ----- ----------------- ---- ---- ----------------
210.219. 67.121 P 00:50:8b:69:82:57 1 2 1-8
210.219. 67.122 00:50:8b:69:82:56 1 4 empty
210.219. 67.123 00:50:8b:69:82:d9 1 3 empty
210.219. 67.124 P 4 00:60:cf:42:70:ee 1-8
210.219. 67.126 00:e0:2b:df:99:00 1 1 empty

IP Information
; L4의 Interface상태 / gateway 상태를 확인할 수 있다.

>> Information# ip
Interface information:
1: 210.219.67.120, 255.255.255.128, 211.196.157.127, vlan 1, up

Default gateway information: metric strict
1: 210.219.67.126, up

Server Load Balancing Information

; Virtual server, real server의 구성 및 상태를 확인 할 수 있다.

>> main# /information/slb/dump

Real server state:
2: 210.219. 67.121, 00:50:8b:69:82:d9, vlan 1, port 2, health 4, up
2: 210.219. 67.122, 00:50:8b:69:82:d8, vlan 1, port 3, health 4, up
2: 210.219. 67.123, 00:50:8b:69:82:d7, vlan 1, port 4, health 4, up

Virtual server state:
2: 210.219. 67.124, 00:60:cf:44:1a:ae
virtual ports:
http: rport http, group 1, backup none
real servers:
1: 210.219. 67.121, backup none, up
2: 210.219. 67.122, backup none, up
3: 210.219. 67.123, backup none, up

Port Statistics
; port에서의 frame error 또는 collision등을 확인할 수 있다.

>> Port Statistics# bridg
------------------------------------------------------------------
Bridging statistics for port 1:
dot1PortInFrames: 0
dot1PortOutFrames: 0
dot1PortInDiscards: 0
dot1TpLearnedEntryDiscards: 0
dot1BasePortDelayExceededDiscards: 0
dot1BasePortMtuExceededDiscards: 0
dot1StpPortForwardTransitions: 0

>> Port Statistics# ethernet
------------------------------------------------------------------
Ethernet statistics for port 1:
dot3StatsAlignmentErrors: 0
dot3StatsFCSErrors: 0
dot3StatsSingleCollisionFrames: 0
dot3StatsMultipleCollisionFrames: 0
dot3StatsSQETestErrors: 0
dot3StatsDeferredTransmissions: 0
dot3StatsLateCollisions: 0
dot3StatsExcessiveCollisions: 0
dot3StatsInternalMacTransmitErrors: 0

Group Session Statistics
; Group으로 load balancing 되어지는 session수를 확인할 수 있다.

>> Statistics # slb

>> Server Load Balancing Statistics# gr 1
------------------------------------------------------------------
Real server group 1 stats:
Current Total Highest
Real IP address Sessions Sessions Sessions Octets
---- --------------- -------- ---------- -------- ---------------
1 210.219. 67.121 1456 3455624 55675 62316
2 210.219. 67.122 2345 12344476 67896 165356559
3 210.219. 67.123 2565 24564476 67896 165356559
---- --------------- -------- ---------- -------- ---------------
5891 35676700 123411 165418875

728x90
728x90

1.) Get-MailboxFolderStatistics -Identity "User A" | fl Name, ItemsInFolder, FolderSize

2.) Get-Mailbox | Get-MailboxStatistics | fl DisplayName, ItemCount, TotalItemSize

728x90
728x90
Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools


728x90
728x90

1.  c:\user.csv 생성한다

   user.csv 편집하에 첫줄에 username 두번째 줄에는 smtp계정( 예- test001)을 줄 단위로 넣어준다

   username

   test001

   test002

   test003

   .

   .

   .



2. 파워쉘 실행

$user = import-csv c:\user.csv

Foreach($userall in $user)

{

$temp = $userall.username

For ($i=1;$i -lt 100; $i++)

{

Send-MailMessage –From test001@contoso.com –To $temp@contoso.com –Subject “Test Email 00$i” –Body “Test E-mail (body) $i” -SmtpServer mail.contoso.com

}

}

엔터


=================================================================================================================================
FYI...

Powershell에서 For, While, Swich를 이용해서 반복문을 작성할 수 있습니다.

 

Step 1 : For

 

For문을 이용해서 i변수에 1부터 입력해서 10까지 합계를 계산을 합니다첫번째 인자는 변수 초기화두번째 인자는 조건문세번째 인자는 증감을 설정을 합니다.

 

$sum = 0

For ($i=1;$i -lt 11; $i++)

{

    $sum += $i

}

 

$sum

 

 

Step 2 : While

 

While문을 이용해서 i변수를 이용해서 1부터 10까지 합계를 계산을 합니다.

 

$sum = 0

$i = 0

while($i -lt 11)

{   

    $sum += $i

    $i++

}

 

$sum

 

 

아래의 Script For문을 While문처럼 사용한 예입니다.

 

$sum = 0

$i = 0

for(;$i -lt 11;)

{   

    $sum += $i

    $i++

}

 

$sum

 

 

Step 3 : Swtich

 

Powershell에서 Swtich를 이용해서 반복문을 작성할 수 있습니다아래의 Script문은 배열 변수를 인자로 받아서1~10까지 반복을 합니다. Switch블락에서 변수는 $_기호를 이용해서 사용할 수 있습니다.

 

$sum = 0

$array = 1..10

switch($array)

{

    Default {

    if($_ -gt 11)

    {

        break;

    }

   

    $sum += $_  

   

    }   

}

 

$sum

 

 

참고 자료

 

about_Do

http://technet.microsoft.com/ko-kr/library/dd315317.aspx

about_For

http://technet.microsoft.com/ko-kr/library/dd347609.aspx

 

about_Switch

http://technet.microsoft.com/ko-kr/library/dd347715.aspx

끝.


728x90
728x90

Exchange Server 2016


o view the build number for the version of Exchange 2016 that you’re running, run the following command in the Exchange Management Shell.

Get-ExchangeServer | Format-List Name, Edition, AdminDisplayVersion

The following table shows the build numbers and general availability dates for each version of Exchange 2016.

Product nameRelease dateBuild number

Exchange Server 2016 RTM

October 1, 2015

15.01.0225.042

Exchange 2016 Preview

July 22, 2015

15.01.0225.016


Exchange Server 2013


To view the build number for the version of Exchange 2013 that you’re running, run the following command in the Exchange Management Shell.

Get-ExchangeServer | Format-List Name, Edition, AdminDisplayVersion

The following table shows the build numbers and general availability dates for each version of Exchange 2013.

Product nameRelease dateBuild number

Exchange Server 2013 CU11

December 15, 2015

15.00.1156.006

Exchange Server 2013 CU10

September 15, 2015

15.00.1130.007

Exchange Server 2013 CU9

June 17, 2015

15.00.1104.005

Exchange Server 2013 CU8

March 17, 2015

15.00.1076.009

Exchange Server 2013 CU7

December 9, 2014

15.00.1044.025

Exchange Server 2013 CU6

August 26, 2014

15.00.0995.029

Exchange Server 2013 CU5

May 27, 2014

15.00.0913.022

Exchange Server 2013 SP1

February 25, 2014

15.00.0847.032

Exchange Server 2013 CU3

November 25, 2013

15.00.0775.038

Exchange Server 2013 CU2

July 9, 2013

15.00.0712.024

Exchange Server 2013 CU1

April 2, 2013

15.00.0620.029

Release to Manufacturing (RTM) version of Exchange Server 2013

December 3, 2012

15.00.0516.032

Exchange Server 2010

To view the build number for the version of Exchange 2010 that you’re running, run the following command in the Exchange Management Shell:

Get-Command ExSetup | ForEach {$_.FileVersionInfo} 

Exchange Server 2010 SP3 build numbers

Product nameRelease dateBuild number

Update Rollup 12 for Exchange Server 2010 SP3

December 15, 2015

14.03.0279.002

Update Rollup 11 for Exchange Server 2010 SP3

September 15, 2015

14.03.0266.002

Update Rollup 10 for Exchange Server 2010 SP3

June 17, 2015

14.03.0248.002

Update Rollup 9 for Exchange Server 2010 SP3

March 17, 2015

14.03.0235.001

Update Rollup 8 v2 for Exchange Server 2010 SP3

December 12, 2014

14.03.0224.002

Update Rollup 8 v1 for Exchange Server 2010 SP3 (recalled)

December 9, 2014

14.03.0224.001

Update Rollup 7 for Exchange Server 2010 SP3

August 26, 2014

14.03.0210.002

Update Rollup 6 for Exchange Server 2010 SP3

May 27, 2014

14.03.0195.001

Update Rollup 5 for Exchange Server 2010 SP3

February 24, 2014

14.03.0181.006

Update Rollup 4 for Exchange Server 2010 SP3

December 9, 2013

14.03.0174.001

Update Rollup 3 for Exchange Server 2010 SP3

November 25, 2013

14.03.0169.001

Update Rollup 2 for Exchange Server 2010 SP3

August 8, 2013

14.03.0158.001

Update Rollup 1 for Exchange Server 2010 SP3

May 29, 2013

14.03.0146.000

Exchange Server 2010 SP3

February 12, 2013

14.03.0123.004

Exchange Server 2007

To view the build number for the version of Exchange 2007 that you’re running, run the following command in the Shell:

Get-Command ExSetup | ForEach {$_.FileVersionInfo} 

Exchange Server 2007 SP3 build numbers

Product nameRelease dateBuild number

Update Rollup 18 for Exchange Server 2007 SP3

December, 2015

08.03.0445.000

Update Rollup 17 for Exchange Server 2007 SP3

June 17, 2015

08.03.0417.001

Update Rollup 16 for Exchange Server 2007 SP3

March 17, 2015

08.03.0406.000

Update Rollup 15 for Exchange Server 2007 SP3

December 9, 2014

08.03.0389.002

Update Rollup 14 for Exchange Server 2007 SP3

August 26, 2014

08.03.0379.002

Update Rollup 13 for Exchange Server 2007 SP3

February 24, 2014

08.03.0348.002

Update Rollup 12 for Exchange Server 2007 SP3

December 9, 2013

08.03.0342.004

Update Rollup 11 for Exchange Server 2007 SP3

August 13, 2013

08.03.0327.001

Update Rollup 10 for Exchange Server 2007 SP3

February 11, 2013

08.03.0298.003

Update Rollup 9 for Exchange Server 2007 SP3

December 10, 2012

08.03.0297.002

Update Rollup 8-v3 for Exchange Server 2007 SP3

November 13, 2012

08.03.0279.006

Update Rollup 8–v2 for Exchange Server 2007 SP3

October 9, 2012

08.03.0279.005

Update Rollup 8 for Exchange Server 2007 SP3

August 13, 2012

08.03.0279.003

Update Rollup 7 for Exchange Server 2007 SP3

April 16, 2012

08.03.0264.000

Update Rollup 6 for Exchange Server 2007 SP3

January 26, 2012

8.03.0245.002

Update Rollup 5 for Exchange Server 2007 SP3

September 21, 2011

8.03.0213.001

Update Rollup 4 for Exchange Server 2007 SP3

May 28, 2011

8.03.0192.001

Update Rollup 3-v2 for Exchange Server 2007 SP3

March 30, 2011

8.03.0159.002

Update Rollup 2 for Exchange Server 2007 SP3

December 10, 2010

8.03.0137.003

Update Rollup 1 for Exchange Server 2007 SP3

September 9, 2010

8.03.0106.002

Exchange Server 2007 SP3

June 7, 2010

8.03.0083.006


728x90
728x90

1.한명만 생성 할 경우

New-Mailbox -OrganizationalUnit AllUser -Alias test002 -Name "test002" -FirstName test002 -DisplayName "test002" -UserPrincipalName test002@contoso.com -Password (ConvertTo-SecureString -String 'Qwer1234' -AsPlainText -Force)



2.대량으로 생성 할 경우

  - c:\user.csv 생성

    user.csv 편집(첫줄에 username 후 아래 부터는 계정을 한줄한줄 넣어주세요. 원하는 만큼..)

 - 파워쉘 실행

    $user = import-csv c:\user.csv

    Foreach($userall in $user)

   {

        $temp = $userall.username

 New-Mailbox -Database Management_Database -OrganizationalUnit AllUser -Alias $temp -Name $temp -FirstName $temp -DisplayName "$temp" -UserPrincipalName $temp@contoso.com -Password (ConvertTo-SecureString -String 'Qwer1234' -AsPlainText -Force)

}

엔터

끝.


728x90

+ Recent posts