728x90

[환경]

Windows Server 2008 R2

     

     

파워쉘을 이용하여 사용자 계정에 대한 최근 접속 이력을 체크하고 특정 조건을 사용하여 비활성화 하는 방법

     

     

1. Active Directory 모듈 활성

Get-ADUser, Disable-ADAccount, Move-ADObject 명령을 실행하기 위해 도메인 컨트롤러 서버에서 Active Directory Powershell 모듈을 활성화합니다.

Import-Module ActiveDirectory

     

2. 조회

다음 조건을 만족하는 사용자를 조회합니다.

*조건1. 마지막 로그온 날짜가 30일 이상 지남

Get-ADUser -Filter * -Properties "LastLogonDate" | sort-object -property lastlogondate -descending | where-object {$_.LastLogonDate -le ((get-date).AddDays(-30))} | where-object {$_.LastLogonDate -ne $null} | Format-Table -property name, lastlogondate, DistinguishedName, Enabled -AutoSize

   

3. 계정 Disable

다음 조건을 만족하는 사용자는 상태를 disable로 변경합니다.

*조건1. 마지막 로그온 날짜가 30일 이상 지남

Get-ADUser -Filter * -Properties "LastLogonDate" | where-object {$_.LastLogonDate -le ((get-date).AddDays(-30))} | where-object {$_.LastLogonDate -ne $null} | Disable-ADAccount

     

결과> 계정 상태 변경 (disable)

     

4. 계정 OU 이동

다음 조건을 만족하는 사용자를 "Prison" OU로 이동합니다.

*조건1. 마지막 로그온 날짜가 30일 이상 지남

*조건2. Disable 상태

Get-ADUser -Filter * -Properties "LastLogonDate" | where-object {$_.LastLogonDate -le ((get-date).AddDays(-30))}

| where-object {$_.LastLogonDate -ne $null} | where-object {$_.Enabled -eq $false} | Move-ADObject -TargetPath "OU=Pris

on,DC=corp,DC=hypark,DC=lab"

     

결과> Users2 에서 Prison 으로 OU 변경 됨

728x90
728x90
  • Exchange Server에서 PartnerApplication 설정

    "C:\Program Files\Microsoft\Exchange Server\V15\Scripts\Configure-EnterprisePartnerApplication.ps1 -AuthMetaDataUrl 'https://pool01.koreare.com/metadata/json/1' -ApplicationType Lync"

       

       

    • SFB 서버에서 서버간 인증구성

       

    • SFB서버에서 Exchange 서버를 파트너어플리케이션으로 생성

    New-CsPartnerApplication -Identity Exchange -ApplicationTrustLevel Full -MetadataUrl "https://autodiscover.koreare.com/autodiscover/metadata/json/1"

       

    • SFB Server에서 테스트 진행(success면 성공)

PS C:\Users\administrator.KOREARE> Test-CsExStorageConnectivity -sipuri "iu@kore

are.com" -Verbose

자세한 정보 표시: Successfully opened a connection to storage service at

localhost using binding: NetNamedPipe.

자세한 정보 표시: Create message.

자세한 정보 표시: Execute Exchange Storage Command.

자세한 정보 표시: Processing web storage response for ExCreateItem Success.,

result=Success, activityId=9b682e2e-536a-481c-b8b9-749ad889ac7a, reason=.

자세한 정보 표시: Activity tracing:

2016-04-19 08:10:58.966 Lookup user details, sipUri=sip:iu@koreare.com,

smtpAddress=iu@koreare.com, sid=S-1-5-21-1919050813-91945802-1330746039-1638,

upn=iu@koreare.com, tenantId=00000000-0000-0000-0000-000000000000

2016-04-19 08:10:59.014 Autodiscover, send GetUserSettings request,

SMTP=iu@koreare.com, Autodiscover

Uri=https://autodiscover.koreare.com/autodiscover/autodiscover.svc, Web

Proxy=<NULL>

2016-04-19 08:10:59.044 Autodiscover.EWSMA trace,

type=AutodiscoverRequestHttpHeaders, message=<Trace

Tag="AutodiscoverRequestHttpHeaders" Tid="82" Time="2016-04-19 08:10:59Z">

POST /autodiscover/autodiscover.svc HTTP/1.1

Content-Type: text/xml; charset=utf-8

Accept: text/xml

User-Agent: ExchangeServicesClient/15.00.1005.003

   

   

</Trace>

   

2016-04-19 08:10:59.063 Autodiscover.EWSMA trace, type=AutodiscoverRequest,

message=<Trace Tag="AutodiscoverRequest" Tid="82" Time="2016-04-19 08:10:59Z"

Version="15.00.1005.003">

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2013</a:RequestedServerVersion>

   

<wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodiscove

r/GetUserSettings</wsa:Action>

   

<wsa:To>https://autodiscover.koreare.com/autodiscover/autodiscover.svc</wsa:To>

   

</soap:Header>

<soap:Body>

<a:GetUserSettingsRequestMessage

xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Users>

<a:User>

<a:Mailbox>iu@koreare.com</a:Mailbox>

</a:User>

</a:Users>

<a:RequestedSettings>

<a:Setting>InternalEwsUrl</a:Setting>

<a:Setting>ExternalEwsUrl</a:Setting>

<a:Setting>ExternalEwsVersion</a:Setting>

</a:RequestedSettings>

</a:Request>

</a:GetUserSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

</Trace>

   

2016-04-19 08:10:59.569 Autodiscover.EWSMA trace,

type=AutodiscoverResponseHttpHeaders, message=<Trace

Tag="AutodiscoverResponseHttpHeaders" Tid="82" Time="2016-04-19 08:10:59Z">

HTTP/1.1 200 OK

Transfer-Encoding: chunked

request-id: b628865a-b7b6-4244-886b-2bce32c62d2c

X-CalculatedBETarget: ex16.koreare.com

X-DiagInfo: EX16

X-BEServer: EX16

X-FEServer: EX16

Cache-Control: private

Content-Type: text/xml; charset=utf-8

Date: Tue, 19 Apr 2016 08:10:59 GMT

Set-Cookie:

X-BackEndCookie=actas1(sid:S-1-5-21-1919050813-91945802-1330746039-1638|smtp:iu

@koreare.com|upn:iu@koreare.com)=u56Lnp2ejJqBmZrHnc3KzJzSmcjNztLLzZ7I0p2bx57SnJ

qdzs2dy8nGyczGgYHNz87J0s/K0s7Gq8/Hxc7PxcrGgZSQjZqejZrRnJCSgc8=; expires=Thu,

19-May-2016 08:10:59 GMT; path=/autodiscover; secure; HttpOnly

Server: Microsoft-IIS/8.5

X-AspNet-Version: 4.0.30319

X-Powered-By: ASP.NET

   

   

</Trace>

   

2016-04-19 08:10:59.570 Autodiscover.EWSMA trace, type=AutodiscoverResponse,

message=<Trace Tag="AutodiscoverResponse" Tid="82" Time="2016-04-19 08:10:59Z"

Version="15.00.1005.003">

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action

s:mustUnderstand="1">http://schemas.microsoft.com/exchange/2010/Autodiscover/Au

todiscover/GetUserSettingsResponse</a:Action>

<h:ServerVersionInfo

xmlns:h="http://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>15</h:MajorVersion>

<h:MinorVersion>1</h:MinorVersion>

<h:MajorBuildNumber>225</h:MajorBuildNumber>

<h:MinorBuildNumber>41</h:MinorBuildNumber>

<h:Version>Exchange2015</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetUserSettingsResponseMessage

xmlns="http://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<UserResponses>

<UserResponse>

<ErrorCode>NoError</ErrorCode>

<ErrorMessage>오류가 없습니다.</ErrorMessage>

<RedirectTarget i:nil="true" />

<UserSettingErrors />

<UserSettings>

<UserSetting i:type="StringSetting">

<Name>InternalEwsUrl</Name>

<Value>https://mail.koreare.com/EWS/Exchange.asmx</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ExternalEwsUrl</Name>

<Value>https://mail.koreare.com/ews/exchange.asmx</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ExternalEwsVersion</Name>

<Value>15.01.0225.000</Value>

</UserSetting>

</UserSettings>

</UserResponse>

</UserResponses>

</Response>

</GetUserSettingsResponseMessage>

</s:Body>

</s:Envelope>

</Trace>

   

2016-04-19 08:10:59.605 Autodiscover, received GetUserSettings response,

duration Ms=589, response=NoError

2016-04-19 08:11:01.697 Lookup user details, sipUri=sip:iu@koreare.com,

smtpAddress=iu@koreare.com, sid=S-1-5-21-1919050813-91945802-1330746039-1638,

upn=iu@koreare.com, tenantId=00000000-0000-0000-0000-000000000000

자세한 정보 표시: Items choice type: CreateItemResponseMessage.

자세한 정보 표시: Response message, class: Success, code: NoError.

자세한 정보 표시: Item:

Microsoft.Rtc.Internal.Storage.Exchange.Ews.MessageType, Id:

AAMkADM3YWM1NGU3LWI2ZmQtNGE3OS1iZjkxLWEyNWI3YzMyNzlkNABGAAAAAAASKHyaongGQoN9klK

qwo7tBwDYpKMYqsX0T5qOmJzkL3KFAAAAlsY0AADYpKMYqsX0T5qOmJzkL3KFAAAK/EftAAA=,

change key: CQAAABYAAADYpKMYqsX0T5qOmJzkL3KFAAAK+5Gs, subject: , body: .

자세한 정보 표시: Is command successful: True.

Test passed.

PS C:\Users\administrator.KOREARE>

   

   

  • SFB서버에서 Exchange 트러스트 어플리케이션 풀 생성 해줍니다.(하기는 미리 구성 되어 있어서 설정값만 수정 후 조회했습니다.)

    또한 5199포트로 OutlookWebapp에 대한 트러스트어플리케이션 생성

   

  • Exchange 서버에서 OCS 사용 설정

   

  • Exchange 서버에서 IM(노란색 참조)

[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts>Set-OwaMailboxPolicy -Identity "Default" -InstantMessagingEn

abled $True -InstantMessagingType "OCS"

[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts>New-SettingOverride SetIMServerNameEX16 -Server EX16 -Compon

ent OwaServer -Section IMSettings -Parameters @('IMServerName=pool01.koreare.com') -Reason "OWA IM config"

   

   

RunspaceId : 58f32e19-d237-4984-90e0-9cf1b5a618a9

ComponentName : OwaServer

SectionName : IMSettings

FlightName :

ModifiedBy : koreare.com/Users/Administrator

Reason : OWA IM config

MinVersion :

MaxVersion :

FixVersion :

Server : {EX16}

Parameters : {IMServerName=pool01.koreare.com}

XmlRaw : <S CN="OwaServer" SN="IMSettings" MB="koreare.com/Users/Administrator" R="OWA IM config"><Ss><S>EX1

6</S></Ss><Ps><P>IMServerName=pool01.koreare.com</P></Ps></S>

AdminDisplayName :

ExchangeVersion : 0.1 (8.0.535.0)

Name : SetIMServerNameEX16

DistinguishedName : CN=SetIMServerNameEX16,CN=Setting Overrides,CN=Global Settings,CN=koreare,CN=Microsoft Exchange,CN=

Services,CN=Configuration,DC=koreare,DC=com

Identity : SetIMServerNameEX16

Guid : dbccc5dc-b624-413b-8062-2eba1d7bebd1

ObjectCategory : koreare.com/Configuration/Schema/ms-Exch-Config-Settings

ObjectClass : {top, msExchConfigSettings}

WhenChanged : 2016-04-19 오후 5:53:43

WhenCreated : 2016-04-19 오후 5:53:43

WhenChangedUTC : 2016-04-19 오전 8:53:43

WhenCreatedUTC : 2016-04-19 오전 8:53:43

OrganizationId :

Id : SetIMServerNameEX16

OriginatingServer : DC01.koreare.com

IsValid : True

ObjectState : Unchanged

   

[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts>New-SettingOverride SetIMCertificateThumbprintEX16 -Server E

X16 -Component OwaServer -Section IMSettings -Parameters @('IMCertificateThumbprint=D2A9B625C0DD80B594AA0EE7039EB5D078D

2B586') -Reason "OWA IM Config"

   

   

RunspaceId : 58f32e19-d237-4984-90e0-9cf1b5a618a9

ComponentName : OwaServer

SectionName : IMSettings

FlightName :

ModifiedBy : koreare.com/Users/Administrator

Reason : OWA IM Config

MinVersion :

MaxVersion :

FixVersion :

Server : {EX16}

Parameters : {IMCertificateThumbprint=D2A9B625C0DD80B594AA0EE7039EB5D078D2B586}

XmlRaw : <S CN="OwaServer" SN="IMSettings" MB="koreare.com/Users/Administrator" R="OWA IM Config"><Ss><S>EX1

6</S></Ss><Ps><P>IMCertificateThumbprint=D2A9B625C0DD80B594AA0EE7039EB5D078D2B586</P></Ps></S>

AdminDisplayName :

ExchangeVersion : 0.1 (8.0.535.0)

Name : SetIMCertificateThumbprintEX16

DistinguishedName : CN=SetIMCertificateThumbprintEX16,CN=Setting Overrides,CN=Global Settings,CN=koreare,CN=Microsoft E

xchange,CN=Services,CN=Configuration,DC=koreare,DC=com

Identity : SetIMCertificateThumbprintEX16

Guid : f14fe273-9d77-49f5-9c8e-ec8cf8ade2b0

ObjectCategory : koreare.com/Configuration/Schema/ms-Exch-Config-Settings

ObjectClass : {top, msExchConfigSettings}

WhenChanged : 2016-04-19 오후 5:55:10

WhenCreated : 2016-04-19 오후 5:55:10

WhenChangedUTC : 2016-04-19 오전 8:55:10

WhenCreatedUTC : 2016-04-19 오전 8:55:10

OrganizationId :

Id : SetIMCertificateThumbprintEX16

OriginatingServer : DC01.koreare.com

IsValid : True

ObjectState : Unchanged

   

[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts>Get-ExchangeDiagnosticInfo -Server $ENV:COMPUTERNAME -Proces

s Microsoft.Exchange.Directory.TopologyService -Component VariantConfiguration -Argument Refresh

   

RunspaceId : 58f32e19-d237-4984-90e0-9cf1b5a618a9

Result : <Diagnostics>

<ProcessInfo>

<id>2168</id>

<serverName>EX16</serverName>

<startTime>2016-04-15T00:28:38.8612397Z</startTime>

<currentTime>2016-04-19T08:55:56.1901401Z</currentTime>

<lifetime>4.08:27:17.3289004</lifetime>

<threadCount>24</threadCount>

<handleCount>1198</handleCount>

<workingSet>83.57 MB (87,633,920 bytes)</workingSet>

</ProcessInfo>

<Components>

<VariantConfiguration>

<Overrides Updated="2016-04-19 오전 8:55:58">

<SettingOverride>

<Name>SetIMCertificateThumbprintEX16</Name>

<Reason>OWA IM Config</Reason>

<ModifiedBy>koreare.com/Users/Administrator</ModifiedBy>

<ComponentName>OwaServer</ComponentName>

<SectionName>IMSettings</SectionName>

<Status>Accepted</Status>

<Message>This override synced to the server but whether it applies to the services running on t

his server depends on the override parameters, current configuration and the context.</Message>

<Parameters>

<Parameter>IMCertificateThumbprint=D2A9B625C0DD80B594AA0EE7039EB5D078D2B586</Parameter>

</Parameters>

</SettingOverride>

<SettingOverride>

<Name>SetIMServerNameEX16</Name>

<Reason>OWA IM config</Reason>

<ModifiedBy>koreare.com/Users/Administrator</ModifiedBy>

<ComponentName>OwaServer</ComponentName>

<SectionName>IMSettings</SectionName>

<Status>Accepted</Status>

<Message>This override synced to the server but whether it applies to the services running on t

his server depends on the override parameters, current configuration and the context.</Message>

<Parameters>

<Parameter>IMServerName=pool01.koreare.com</Parameter>

</Parameters>

</SettingOverride>

</Overrides>

</VariantConfiguration>

</Components>

</Diagnostics>

Identity :

IsValid : True

ObjectState : New

   

   

   

[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts>

   

  • 클라이언트에서 OWA에 접속하여 Presence 상태가 나오는지 확인
  • OWA에서 IM 테스트


728x90
728x90

누가 언제 계정을 삭제 했는지 확인 해 달라는 경우가 있습니다.

GPO를 이용한 계정 감사를 해보았습니다.

   

계정 관리 감사 활성화 방법입니다.

  • 그룹 정책 관리 -> Default Domain Policy -> 편집 -> 컴퓨터 구성 -> Windows 설정 -> 보안 설정 -> 로컬 정책 -> 감사 정책

  • 계정 관리 감사 정책 활성화

  • 실행 -> cmd -> gpupdate /force 실행

       

    상위와 같이 계정 관리 감사 정책을 활성화 하면 계정 생성 및 삭제 된 정보가 이벤트 로그에 남게 됩니다.

       

  • 계정 생성 테스트

    계정을 생성하게 되면 하기와 같이 4738 이벤트가 발생

  • 계정 삭제 테스트

    계정을 삭제하면 하기와 같이 4726 이벤트가 발생

                

       


728x90
728x90

Enable-ADOptionalFeature –Identity "CN=RecycleBin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=koreare,DC=com" –Scope ForestOrConfigurationSet –Target "koreare.com"

   

Get-ADObject -SearchBase "CN=Deleted Objects,DC=koreare,DC=com" -ldapFilter "(objectClass=*)" -includeDeletedObjects | Format-List Name,ObjectClass,ObjectGuid

   

Restore-ADObject –identity c6cbe4b3-ed3d-45d6-ab46-fd6223ca7075

   

생성 된 계정 확인

   

끝.

728x90
728x90

-          Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\MSExchange OWA' -Name PrivateTimeout -Value <amount of time> -Type DWORD

-          Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\MSExchange OWA' -Name PublicTimeout -Value <amount of time> -Type DWORD

 

위의 명령어 두줄을 실행하시되, <amount of time> 에는 분단위로 세션을 지속시킬 시간을 설정 합니다. ( 단위로 1 ~ 43,200 까지 설정 가능 합니다.)

 

-          , 쿠키의 세션 타임 아웃을 8시간으로 설정하는 경우 아래와 같이 Value 값을 480으로 설정

o    Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\MSExchange OWA' -Name PrivateTimeout -Value 480 -Type DWORD

o    Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\MSExchange OWA' -Name PublicTimeout -Value 480 -Type DWORD

728x90
728x90

1

Step by Step: Adding Your Second Lync Standard Edition Server 2013 & Creating an Associated Backup Pool for Resiliency Part 4

By Matt Landis __on 8/06/2012 10:23:00 AM

We are on a journey installing various Lync Server 2013 roles. In today's step by step, we will setup our 2nd Lync Server Standard Edition pool and then set it up as a Backup Registrar so automatic failover can happen. We will also look at Lync Server 2013's new failover capabilities that allow full client capability to be restored in the event of a disaster. To use this blog the only other lab you need to have done is Part 1.

Previous Articles in this Series:

  • Part 1 Step by Step Installing Lync Server 2013 Standard Edition Front End
  • Part 2- Step by Step Installing Lync Server 2013 SE Monitoring Server
  • Part 3 Step by Step Installing Lync Server 2013 Persistent Chat Server
  • Part 4 - Step by Step Installing Your 2nd Lync Server 2013 SE Server Associated Backup Pool for Resiliency

    Prepare the 2nd Front End Server: Prerequisites

    See Lync Server 2013 prerequisites here. Installing your 2nd Lync Pool is much like installing the first. We will go over the steps below briefly, with special notes. But for detailed notes on installing an FE server, just refer to the Part1 blog in this series.

    Install Lync Server 2013

    Insert Lync Server 2013 CD, and when you see popup below, click Yes

    Once the Deployment Wizard appears we are done here for now.

    Open Topology Builder to Add Your 2nd Front End Server/Pool

    Right Click on "Standard Edition Front End Servers" | New Front End Pool

    NOTE: While the topology builder and this blog refer to a Standard Edition Front End Pool, just be aware that a Standard Edition Front End Pool really is just one Front End Server, because there only can be one server in a Standard Edition Pool.

    Next | Enter our Backup Front End FQDN (FE02.lab.local) | Next

    Check Conferencing, Enterprise Voice. (Note: you will not be able to check CAC because only 1 per Site)

    Now instead of screenshots for each screen, we'll just note what we want to check.

  • Collocate Mediation = Yes | Next
  • Enable and Edge Pool = No | Next
  • let defaults | Next
  • let Defaults (Note: you need to create this share just like your original share) | Next
  • let defaults | Next
  • let defaults | Next
  • Action | Topology | Publish

    Goto the Primary (FE01.lab.local) Standard Server and Open Lync Server 2013 Deployment Wizard

    Click on "Install or Update Lync Server System"

    step 2 and Run

    After it completes, click Finish.

    Now Goto the Backup (FE02.lab.local) Standard Server and Open Lync Server 2013 Deployment Wizard

    Click on "Install or Update Lync Server System"

  • Step 1 Run (15-30minute wait) Finish
  • Step 2: Run | Next (10minutes wait)
  • Step 3
  • Step 4

    We'll Test Our 2nd Pool/Server By Moving Users to It

    To test, log into Lync Server control panel. Notice you will now be asked which Lync pool you want to log in to. Let's select FE01.lab.local.

    Once the LSCP is open well click Users | Find | Select u1@lab.local | Action | Move Selected Users to Pool… |

    Now lets select our new Pool/Server (FE02.lab.local) and click OK.

    After you move a user there is no need to refresh the user list, this is automatically done for you. And, sure enough, the u1@lab.local is now on FE02.lab.local! Great.

    Now lets open Lync 2013 client and login using user u1@lab.local that we just enabled on our 2nd Standard Edition Front End Pool/Server (FE02.lab.local). Good, our new pool works!

    What Happens when we change Pools During an Active Conversation or Call?

    Since we could easily move user(s) to our new Pool/Server with no sweat, now lets get dangerous. Call someone using u1@lab.local and CHANGE POOLS DURING THE CALL. 

    Let's repeat the steps we just took above, but do it during a live call and see what happens.

    Below is a screenshot of what happens if you change pools/servers during a peer to peer call:

  • The Lync 2013 client will momentarily logout and back in again
  • During this time (as you see below) the call continues
  • Sharing continues
  • Video continues
  • As noted in the conversation window, functionality is momentarily limited:
  • Video cannot be started during momentary logout/in
  • Sharing limited and below items will be interrupted
  • Polls
  • whiteboard
  • Powerpoint

    That' pretty cool, right? Yeah.

    Setup a Resilient Pool (aka Associated Backup Pool)

    Now let's setup our 2nd Front End Pool/Server as an Associated backup pool so that if our 1st Front End Pool goes down the clients can automatically failover to the 2nd Front End Pool.

    Open Topology Builder and download the topology.

    Next, we'll edit the primary "Standard Edition Front End Servers" by right clicking and click "Edit Properties"

    Now we can define our Resiliency settings

  • Associated backup pool = FE02.lab.local; (Note the warning about having both FE's in the same site. For our lab, and in some production we can ignore this)
  • Automatic = Checked
  • Failover = 30secs (for lab purposes, this would be short for production)
  • Failback = 30secs (for lab purposes)
  • Then click OK to finish.

    Let's Publish the Topology by clicking: Action | Topology | Publish | Next |

    Open text file to see what you should do next. In our case we are instructed to run Install or Update Setup/Update on FE01 and FE02. Now click Finish.

    Based on our "next steps" instructions noted above, lets open Lync Server Deployment Wizard on FE01.lab.local and click on "Install or Update Lync Server System"

  • Step 2 Run | Next |Next
  • Step 4 Run | Next | (this will get our new Lync server Backup Service running)

    Lets open Lync Server Deployment Wizard on FE02.lab.local and click on "Install or Update Lync Server System"

  • Step 2 Run | Next
  • NOTE: If Step 2 fails with "Can not update database XDS"  error then we need to manually install the rtc database using the PS command below:
  • install-csdatabase centralmanagementdatabase sqlserverfqdn FE02.lab.local sqlinstancename rtc
  • Now run Step 2 again.
  • Step 3 (if necessary)
  • Step 4

    Run the below Powershell commands on your FE01.lab.local to ensure conferencing data is replicated:

  • Invoke-CSBackupServiceSync PoolFqdn FE01.lab.local
  • Invoke-CSBackupServiceSync PoolFqdn FE02.lab.local

    Add DNS SRV Record for Backup Pool/Server

    Now lets go into DNS and add a record for our Backup Pool /Server. This SRV record is necessary so that if the first server (FE01.lab.local in our lab) goes down, the client can find the backup Pool/Server.

    So let open the DNS server management and add the SRV record. The things that are important:

  • Service = _sipinternaltls
  • Protocol = _tcp
  • Priority = 10 (take note: this value is different than your initial SRV record)
  • Weight = 10 (take note: this value is different than your initial SRV record)
  • Port number = 5061
  • Host offering this server = FE02.lab.local

    After you have added this DNS record you might want to verify it has taken effect on the client PC by running NSLookup on the clients you will be testing.

  • NSLookup
  • set type=srv
  • _sipinternaltls._tcp.lab.local

    You Might Need This Step, But Only do it if Needed: Remove The Cert Without the Backup Server Name in it

    NOTE: Please, take a minute and thank Dustin Hannifin and Jason Lee for providing this crucial step in this blog post

    With both Primary and Backup Front End Server running do the following:

    Exit Lync 20013 client on client machine.

    On same client machine: Open MMC

    File | Add/Remove Snap-in | Certificates | My User Account | Ok

    Navigate to: Personal | Certificates and delete the cert named same as your Lync username.

    Now let log back into Lync 2013 client.

    Now, Let's Test Resiliency by Disabling NIC on Primary Front End (FE01.lab.local)

    Make sure all your users (that you want to test resiliency for) are homed on FE01.lab.local. Next, we'll simulate our FE01.lab.local machine being down by disabling the NIC.

    Now around 30 seconds, our client(s) should log out. Sure enough!

    Now they will try to login to the backup pool (in this case FE02.lab.local)

    NOTE: We setup our failover to happen in 30seconds. I've noticed in my lab the failing Lync clients will logout very near 30 seconds, but it could take several minutes till the clients are able to log back into the Associated Backup Pool/Server (FE02.lab.local). (ie: be fully failed over) I haven't taken the time to investigate if this is my lowly lab's performance 

    , or something built into Lync. (if someone knows, please post a comment)

    But sure enough, it logged into backup pool! You will notice the Lync 2013 client let's you know you have some limitations:

  • Contact List is unavailable
  • Call Forwarding may not be working
  • Delegates and Team-Call may not be receiving calls
  • Limited chat room access
  • Etc.

    Now if we enable the NIC on FE01.lab.local the clients should Failback to FE01.lab.local in 30 seconds. (NOTE: on my lab some clients would failback as soon as 10 seconds.)

    Next We Will Take a Look at New Lync Server 2013 Failover Options

    Much of what we have discussed in this blog so far is largely the functionality you will find in Lync Server 2010. (I suspect you could use most of the above steps in Lync 2010.) But with Lync Server 2013, the Lync Server administrator can now failover the CMS and the failed pool so that the "Limited Functionality due to outage" is removed. Let's get started with our failover.

    Our first step is to find out where the Active Central Management Database is hosted. To do this we run the PowerShell:

  • Get-CsService CentralManagement

    As shown below, FE01.lab.local is the PoolFqdn (we will refer to this as $CMS_Pool) of the currently Active CMS.

    The next step is to check if the the $CMS_Pool is running Lync Server 2013. You can do this in Topology Builder (in our lab we know it is, but in a live environment we might not) If the $CMS_Pool is running Lync 2013 we can use this PowerShell to see who it's backup pool is:

    Get-CsPoolBackupRelationship PoolFQDN $CMS_Pool

    As shown below we can see the $Backup_Pool is FE02.lab.local

    Next we will see if the $CMS_Pool is available right now:

    Get-CsManagementStoreReplicationStatus CentralManagementStoreStatus

    Below we have an example how this command will look with the $CMS_Pool available.

    Now lets disable the NIC on $CMS_Pool (ie FE01.lab.local) to simulate server down. Our primary Lync FE is now down! (shown below)

    Now run the Get-CsManagementStoreReplicationStatus CentralManagementStoreStatus  command again. Note that the command will fail/error out if the $CMS_Pool/FE01.lab.local is not available.

    (NOTE: If this is a Ent. Edition server you will need to check which Back End holds the primary CMS using: Get-CsDatabaseMirrorState -DatabaseType CMS -PoolFqdn <Backup_Pool Fqdn> . Read more about this command by Clicking Here. Running this command on Std. Edition will fail. On a Std. Edition server there is only one server so we know which it is. )

    Next we will run the command to failover the Central Management Server to our Backup Server:

  • Invoke-CsManagementServerFailover -BackupSqlServerFqdn FE02.lab.local BackupSqlInstanceName RTC Force

    Now lets verify the move happened by running:

  • Get-CsManagementStoreReplicationStatus CentralManagementStoreStatus

    Sure enough! the new ActiveMasterFQDN is now FE02.lab.local (as shown below). Great!

    Now we can fail over the Pool by running:

  • Invoke-CsPoolFailOver PoolFqdn FE01.lab.local Disastermode Verbose

    After runningVoila! The Lync Client services are automatically restored to Lync 2013and the "Limited Functionality" notice disappears with no user interaction!

    Notes:

  • On my 3 user lab this script took about 50 seconds to complete. After it completed I waited a little over a minute until full capability was restored to the Lync client!
  • The Chat service was not restored because resiliency was not setup in our lab for this service.

    Conclusion

    Well--yahoo! We have successfully setup a Lync Standard Edition Associated Backup Pool and we have demonstrated Lync Server 2013's very improved complete Failover resiliency.

    Continue your lab with more articles in this Lync Server 2013 Step by Step Series:

  • Part 1 Step by Step Installing Lync Server 2013 Standard Edition Front End
  • Part 2- Step by Step Installing Lync Server 2013 SE Monitoring Server
  • Part 3 Step by Step Installing Lync Server 2013 Persistent Chat Server
  • Part 4 - Step by Step Installing Your 2nd Lync Server 2013 SE Server Associated Backup Pool for Resiliency
  • Part 5 Step by Step Enabling Lync Server 2013 Enterprise Voice Features, Response Groups and Managers
  •    

    Special Thanks to Elan Shudnow and his great article on Lync 2010 Resiliency:

    http://www.shudnow.net/2012/05/04/lync-2010-central-site-resilience-w-backup-registrars-failovers-and-failbacks-part-3/

       

    http://social.technet.microsoft.com/wiki/contents/articles/9289.second-lync-standard-edition-server-to-provide-a-limited-high-availability-en-us.aspx

    http://jasonmlee.net/archives/459

  • See this post
  • If you want to Fail Back to FE01.lab.local

  • Invoke-CsPoolFailback -PoolFQDN FE01.lab.local Verbose  (may take 10-15minutes; Lync will logout/in near end)
  • Invoke-CsManagementServerFailover -BackupSqlServerFqdn FE02.lab.local BackupSqlInstanceName RTC Force ( this just takes 10secs)

       

    출처: <http://windowspbx.blogspot.kr/2012/08/step-by-step-adding-your-second-lync.html>

       

       

728x90
728x90

Memory Pool Monitor (poolmon.exe)를 사용하여 커널모드 메모리 누수를 찾아보자

 

- Detecting and analyzing Memory Leaks

 

 


## poolmon.exe 사용법


1) poolmon.exe로 Paged Pool 사용량 확인

 

2) Tag를 확인하여

 

3) c:\>findstr /m /s /i tag명 *.sys

 

 

옵션

 

 

 

참고사이트


http://support.microsoft.com/kb/177415/ko
http://jkmoon.tistory.com/100
http://withsage.net/blog/archives/category/it/computer/windbg

http://process3.blog.me/20089981837
http://laigo.kr/34


728x90
728x90

IIS 메모리 점유율이 많아질 경우 항상 잊어먹어서 찾는 검색이네요.

자주 쓸 일이 있어서 기록해둡니다.



C:\>cd Windows\system32\inetsrv

C:\Windows\System32\inetsrv>appcmd list wp

WP "10472" (applicationPool:MSExchangeOABAppPool)

WP "7812" (applicationPool:MSExchangeMapiMailboxAppPool)

WP "4948" (applicationPool:MSExchangeRpcProxyFrontEndAppPool)

WP "8164" (applicationPool:MSExchangeECPAppPool)

WP "7804" (applicationPool:MSExchangeMapiAddressBookAppPool)

WP "3952" (applicationPool:MSExchangeSyncAppPool)

WP "5788" (applicationPool:MSExchangeOWAAppPool)

WP "12484" (applicationPool:MSExchangeServicesAppPool)

WP "1544" (applicationPool:MSExchangeAutodiscoverAppPool)

WP "6616" (applicationPool:MSExchangeMapiFrontEndAppPool)

WP "9504" (applicationPool:MSExchangeRpcProxyAppPool)

WP "9584" (applicationPool:MSExchangePowerShellFrontEndAppPool)

WP "10188" (applicationPool:MSExchangePowerShellAppPool)

WP "6936" (applicationPool:MSExchangeOWACalendarAppPool)


C:\Windows\System32\inetsrv> 



Recycle 할 때 사용하는 명령 줄은 아래와 같다.

IIS 6.0 : cscript //nologo C:\Windows\system32\iisapp.vbs /a "<웹응용프로그램이름>" /r
     예) cscript //nologo C:\Windows\system32\iisapp.vbs /a "SharePoint - 80" /r

IIS 7.0 : C:\Windows\System32\inetsrv\appcmd recycle apppool /apppool.name:"<웹응용프로그램이름>"
     예) C:\Windows\System32\inetsrv\appcmd recycle apppool /apppool.name:"SharePoint - 80"



>tasklist   --> 프로세스 확인

>tasklist /svc  --> 프로세스 서비스 보기

>tasklist /m xxx.dll   --> xxx.dll을 사용하는 모든 프로세스 찾기


728x90
728x90

SFB Powershell을 띄운 후 아래와 같이 입력


PS C:\>Export-CsArchivingData -Identity "archivingdatabase:sfbdb.koreare.com" -StartDate 3/1/2016 -OutputFolder c:\

Total number of sessions: 41  Successfully exported sessions: 41 Failed session

s: 0 



출력된 화면

c:\밑으로 백엔드FQDN_아카이빙폴더명으로 날자별 폴드가 생성 됨



eml형식 아웃룩으로 열어보자

아웃룩에서 연 화면


FYI...https://technet.microsoft.com/en-us/library/gg398452.aspx

728x90
728x90

SSD 512GB 싸게 하나 장만했네요.

한번 해봐야겠습니다.

0. AHCI 변경

   BIOS Setup > Main > SATA Configuration > OnChip SATA Channel > SATA Port1 - Port4 > IDE -> AHCI

1. C1E 비활성화
   BIOS Setup > Advanced > CPU Configuration > C1E Support > Enabled -> Disabled

2. Prefetch & Superfetch 비활성화
   ①  제어판 > 시스템 및 보안 > 관리 도구 > 서비스 > Superfetch > 시작 유형 - "사용 안 함"
   ② 시작 > 실행 > regedit > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Session Manager > Memory Management > PrefetchParameters > EnablePrefetcher - "0" & EnableSuperfetch - "0"

3. Windows Error Reporting Service 비활성화
   제어판 > 시스템 및 보안 > 관리 도구 > 서비스 > Windows Error Reporting Service > 시작 유형 - "사용 안 함"

4. Windows Search 비활성화
   제어판 > 시스템 및 보안 > 관리 도구 > 서비스 > Windows Search > 시작 유형 - "사용 안 함"

5. 디스크에 쓰기 캐시 사용 (SandForce 계열 SSD는 체크 해제)
   제어판 > 시스템 및 보안 > 시스템 > 장치 관리자 > 디스크 드라이브 > SSD - 선택 > 속성 > 정책 > 장치에 쓰기 캐싱 사용 - 체크

6. 메모리 덤프 비활성화
   제어판 > 시스템 및 보안 > 시스템 > 고급 시스템 설정 > 시작 및 복구 - 설정 > 시스템 오류 - 디버깅 정보 쓰기 - "없음"

7. 시스템 복원 기능 비활성화
   제어판 > 시스템 및 보안 > 시스템 > 시스템 보호 > SSD - 선택 - 구성 > 디스크 공간 사용 - 삭제 & 복원 설정 - 시스템 보호 해제 - 체크

8. 디스크 색인 비활성화
   로컬 디스크(SSD) > 속성 > 이 드라이브의 파일 속성 및 내용 색인 허용 - 체크 해제

9. 디스크 조각모음 비활성화
   시작 > 실행 > dfrgui > 일정 구성 > 예약 실행(권장) - 체크 해제

A. 액세스한 날짜 비활성화
   명령 프롬프트(관리자 권한으로 실행) > fsutil behavior set disablelastaccess 1

B. 가상 메모리 비활성화
   ① 제어판 > 시스템 및 보안 > 시스템 > 고급 시스템 설정 > 성능 - 설정 > 고급 > 가상 메모리 - 변경 > 모든 드라이브에 대한 페이징 파일 크기 자동 관리 - 체크 해제 & 페이징 파일 없음 - 체크 - 설정
   ② 시작 > 실행 > regedit > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Session Manager > Memory Management > ClearPageFileAtShutdown - "0" & DisablePagingExecutive - "1"

C. 최대절전모드 비활성화
   ① 명령 프롬프트(관리자 권한으로 실행) > powercfg -h off
   ② 제어판 > 하드웨어 및 소리 > 전원 옵션 > 고성능 - 체크

D. 자동 Trim 작동 여부 확인 & 활성화
   명령 프롬프트(관리자 권한으로 실행) > fsutil behavior query DisableDe1eteNotify -> "DisableDe1eteNotify = 0"이면 Trim 작동중
   미작동시 fsutil behavior set DisableDe1eteNotify 0 

E. 휴지통 사용 안하기
   휴지통 > 속성 > SSD - 선택 > 선택한 위치에 대한 설정 - 파일을 휴지통에 버리지 않고 삭제할 때 바로 제거 - 체크

F. NTFS 파일시스템 설정 변경
   시작 > 실행 > regedit > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > FileSystem > NtfsDisable8dot3NameCreation - "1" & NtfsMemoryUsage - "2"

G. 시스템 메모리 할당 - 프로그램에 최적화
   시작 > 실행 > regedit > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Session Manager > Memory Management > LargeSystemCache - "0"

"5. 디스크에 쓰기 캐시 사용"은 SSD에 따라 최적의 설정이 달라 질 수 있으니 참고하시고,
"B. 가상 메모리 비활성화"는 특정 프로그램들에서는 메모리 부족 에러가 뜰 수 있다고 하니,
각자의 상황에 따라 선택적으로 적용하시면 됩니다.


728x90

+ Recent posts