Pages

Showing posts with label exchange. Show all posts
Showing posts with label exchange. Show all posts

11/06/2013

Exchange 2007 Performance Troubleshooting

Exchange 2007 Performance Troubleshooting

the RPC Counters – these counters will show you if the clients are “feeling” a resource issue
  • MsExchangeIS\RPCAveraged Latency – should be under  50 (100 if in cached)
    • RPC Operations/Sec – Relative (Baseline\Trending
    • RPC Requests – Rec  under 70
  • If you see RPC ops go at around time of latency may be adding too much load

1/09/2013

Some code playing around with sending mail with an attachment from a powershell script. Also launching a packet capture from another process so I can asynchronously repeat a test while doing a capture. -> Although I was able to execute an external command that included variables (to build the command line with a custom value for delay and output file) I was not able to start a job to do that same thing. I resorted to creating a custom batch file for this script and defining tshark duration and output file in that BAT file. -- not as flexible as I was trying to be.

#INSTANCE 1 
#  - Capture command:  C:\WORK\CAP1.BAT
#  - Output file:  CAP1OUT.CAP

$temp = "c:\work"
$test = "\\fs05\users\admin\test"
$threshold = 10
$SmtpServer = "mail.usa.domain.com"
$emailfrom = "no-reply-monitor@domain.com)"
$emailto = "administrator@domain.com"
$emailsubject = "folder count monitor output"
$emailbody = "Folder:  $test contains less than $threshold items"
$emailattachment="c:\temp\file.txt"
$emailfrom = ""
$emailto = ""
$emailsubject = "Monitoring Output"  

function send_email {
 $mailmessage = New-Object system.net.mail.mailmessage 
 $mailmessage.from = ($emailfrom) 
 $mailmessage.To.add($emailto)
 $mailmessage.Subject = $emailsubject
 $mailmessage.Body = $emailbody
 $attachment = New-Object System.Net.Mail.Attachment($emailattachment, 'text/plain')
 $mailmessage.Attachments.Add($attachment)
 #$mailmessage.IsBodyHTML = $true
 $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)  
 #$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("$SMTPAuthUsername", "$SMTPAuthPassword")
 $SMTPClient.Send($mailmessage)
}#end-function

if ((Get-ChildItem $test).Count -lt $threshold){
 "capturing for 30 s"
 ####################################################
 #     CAPTURE COMMAND
   $job = start-job {&cmd "/c","C:\WORK\CAP1.BAT"}
 ####################################################
 start-sleep 10
 "Testing Folder $test"
  Get-ChildItem $test | out-null
 "waiting 30 s"
  Start-Sleep 30
 wait-job $job
 remove-job $job
 "sending CAP file to $emailto"
 ####################################################
 #     OUTPUT FILE
  $emailattachment = "c:\work\cap1out.cap"
 ####################################################
  send_email 
}

2/19/2012

Exchange: Report mailboxes and size

get-mailboxstatistics -server PRIEXS01CCR | ft DisplayName, TotalItemSize > mailboxes.txt

9/04/2011

Enumerate Mailbox Permissions

$root = [ADSI]'LDAP://RootDSE' $dfDefaultRootPath = "LDAP://" + $root.DefaultNamingContext.tostring() $dfRoot = [ADSI]$dfDefaultRootPath $gfGALQueryFilter = "(&(&(&(mailnickname=*)(objectCategory=person)(objectClass=user))))" $dfsearcher = new-object System.DirectoryServices.DirectorySearcher($dfRoot) $dfsearcher.PageSize = 4500 $dfsearcher.Filter = $gfGALQueryFilter $dfsearcher.PropertiesToLoad.Add("msExchMailboxSecurityDescriptor") $srSearchResult = $dfsearcher.FindAll() "Mailbox ACE User" foreach ($emResult in $srSearchResult) { $uoUserobject = New-Object System.DirectoryServices.directoryentry $uoUserobject = $emResult.GetDirectoryEntry() $emProps = $emResult.Properties [byte[]]$DaclByte = $emProps["msexchmailboxsecuritydescriptor"][0] $adDACL = new-object System.DirectoryServices.ActiveDirectorySecurity $adDACL.SetSecurityDescriptorBinaryForm($DaclByte) $mbRightsacls =$adDACL.GetAccessRules($true, $false, [System.Security.Principal.SecurityIdentifier]) foreach ($ace in $mbRightsacls){ if($ace.IdentityReference.Value -ne "S-1-5-10" -band $ace.IdentityReference.Value -ne "S-1-5-18" -band $ace.IsInherited -ne $true){ $sidbind = "LDAP://" $AceName = $ace.IdentityReference.Value $aceuser = [ADSI]$sidbind if ($aceuser.name -ne $null){ $AceName = $aceuser.samaccountname } "" + $uoUserobject.DisplayName + " " + $AceName } } }

Outlook performance and folder size

How item count in Outlook folders affects performance

How to configure the size limit for .pst and .ost files.

5/31/2011

List Exchange Mailbox Permissions

$root = [ADSI]'LDAP://RootDSE' 
$dfDefaultRootPath = "LDAP://" + $root.DefaultNamingContext.tostring()
$dfRoot = [ADSI]$dfDefaultRootPath
$gfGALQueryFilter =  "(&(&(&(mailnickname=*)(objectCategory=person)(objectClass=user))))"
$dfsearcher = new-object System.DirectoryServices.DirectorySearcher($dfRoot)
$dfsearcher.PageSize = 4500
$dfsearcher.Filter = $gfGALQueryFilter
$dfsearcher.PropertiesToLoad.Add("msExchMailboxSecurityDescriptor")
$srSearchResult = $dfsearcher.FindAll()
"Mailbox ACE User"
foreach ($emResult in $srSearchResult) {
 $uoUserobject = New-Object System.DirectoryServices.directoryentry
 $uoUserobject = $emResult.GetDirectoryEntry()
 $emProps = $emResult.Properties
 [byte[]]$DaclByte = $emProps["msexchmailboxsecuritydescriptor"][0]
 $adDACL = new-object System.DirectoryServices.ActiveDirectorySecurity
 $adDACL.SetSecurityDescriptorBinaryForm($DaclByte)
 $mbRightsacls =$adDACL.GetAccessRules($true, $false, [System.Security.Principal.SecurityIdentifier])
 foreach ($ace in $mbRightsacls){
  if($ace.IdentityReference.Value -ne "S-1-5-10" -band $ace.IdentityReference.Value -ne "S-1-5-18" -band $ace.IsInherited -ne $true){  
    $sidbind = "LDAP://"
    $AceName = $ace.IdentityReference.Value 
           $aceuser = [ADSI]$sidbind
    if ($aceuser.name -ne $null){
     $AceName = $aceuser.samaccountname
    }

    "" + $uoUserobject.DisplayName  + " " +  $AceName
  }
 }
}

3/19/2011

Interesting Article

I've had a lot of questions and speculation coming my way about hosted Exchange and "cloud" this and that.
(The Cloud reminds me of how nobody really knew what an extranet was back in the 90's but talked about it all the time...)
This is a very good article about pros and cons of hosted Exchange.

9/28/2009

Month of Chaos

Month of Chaos


Keeping head barely above water is all the progress made in the month of September.
- budget prep crunch for my bosses so I was hopping fulfilling requests for information
- swine flu - one employee and other possibly related absences for care of sick child, pick up from child-care with fever, etc. 2 staff with vacations, 1 staff with training absence, and a regional flood which resulted in multiple staff absences in a 2 day period, and I had a 2 day family emergency as well.
- I still have outstanding the "critical" "urgent" projects from over 3 weeks ago: extranet infrastructure, Windows 2008 Domain upgrade, Database cluster hardware replacement, Shanghai vpn concentrator setup, transition to new Exchange server in Hong Kong, migrate mailboxes out of NYC offices asap to get off rickety hardware platform as well as make progress toward centralization. Progress has been made in fits and bursts, but most of my time and that of my staff has been in dealing with crises almost on a daily basis.
- The Highly Visible Crises: in LIFO order: NYC circuit flap resulting in no failover, Centralized exchange server mysteriously bogged down for 2 minutes, multiple mysterious losses of connectivity of Gig/E link connecting our stretched vlan to secondary data center, various weekend power outages from flooding/storms, security door cardscanner controllers down, new remote contractor with vpn phone problem dragging on for over 1 week must be fixed now, 18 hour total loss of connectivity to branch office awaiting local operations visit to restart router, urgent planning and discussions for replacing database cluster server hardware asafp, two SAN issues in a single day, revelations about free disk requirements for our Compellent SAN, HP virtual connect interface disconnect from HP Onboard Administrator and hurried deployment of new servers to migrate VM's to in order to fix virtual connect, HP iLO bug remotely mapping A: does not work -- the only stinking way to deploy a server is via HP RDP -- pita.
Lessons Learned
- HP iLO firmware bug prevents remotely mapping to A: disk. So there is just about no way to do a manual install and hit F6 during install to load the boot from SAN disk drivers when you are using a blade server. Perhaps this will be fixed with an upgrade to firmware, however that's a house of cards I'd rather not disturb right now. I thought I had made some progress with nLite build of windows installation, but it keeps telling me that I don't have the right disk driver for 64 bit windows 2003. Before we do a remote blade enclosure around the world we *have* to get a windows install working without having to first implement an RDP infrastructure (chicken and egg thing...)
- Duh to Local Operations: Just the fact that somebody can connect to the internet but their phone can't connect to the VPN that doesn't mean there is a problem with the phone itself requiring re-requesting the phone and building in a 3 day delay before this problem gets abdicated on account of lack of gumption to figure it out.
- IPSec vpn - phone or not - *really* doesn't work well when a user buys a router and sticks it in to his 8 year old dsl modem. This was another really phun day of telling a 60+ guy how to unplug his PC from his router into his dsl modem and guess at how to logon to it and browse for possible options for turning off NAT. At one point he got his ISP tech support on his other phone, put it on speaker and put me on speaker and had me try to talk to her. English was her second language (or third) and that didn't work out so he held the phone up to the speaker then to his ear and I would translate her question to him and coach him through our answer back and then explain her instructions to him on what to open, etc.
- Although it may be technically possible to add a tray to a Data Domain Restorer appliance it didn't really work that way for us. A graceful shutdown is much more advisable first.
- Compellent SAN would work best with 15-20% *unallocated* free space to allow for faster rebuilds of the RAIDsets of failed disks, etc. We are pushing 15% of "free" but allocated space. And we had a failing SATA drive around the time when a software bug in 4.3.2 code resulted in it "losing" the preferred paths to the SATA disks. This resulted in the "unlucky" i/o requests coming down the wrong path to pass over the backplane instead and that resulted in 4500ms (yes, 4.5 s) disk latency for the pool overall. This resulted in over 12 hours of troubleshooting and cussing and a conference call and some more stuff before this bug was isolated and resolved. That was an extraordinarly bad day in a totally crappy month.

8/05/2009

Exchange 2007 Client Access Server: Proxy


This is an unbelievable pain.
Exchange 2007 CAS works fine with Exchange 2003 mailbox servers in other AD sites. Why can't it connect with a Exchange 2007 server in another AD site and not require proxying which means we have to used integrated authentication.
That really sucks because all our users a lulled into not having to put their domain in front of the userid when they logon -- all thanks to forms based authentication.

2/25/2009

MS Exchange Failover to SCR Node


It was a really fun weekend. Scheduled building powerdown overnight -- shutdown Exchange servers gracefully. Next morning both CCR nodes fail to boot up. After hours on the phone with server vendor, SAN vendor, and Microsoft decided to failover to SCR copy. It didn't seem to go according to documents I've read.

Below are notes of how documents said it should work:

To get a formated list of SG settings:
Get-storagegroup -server priexs01ccr | fl


The following commands were used to move PRIEXS01CCR to SCR target SECEXS01-1:
Restore-StorageGroupCopy –Identity


(Pasted from http://www.msexchange.org/articles_tutorials/exchange-server-2007/high-availability-recovery/clustered-continuous-replication-failover-standby-continuous-replication-part2.html)

StandbyMachine NH-W2K3-SRV01 -Force

(Pasted from http://www.msexchange.org/articles_tutorials/exchange-server-2007/high-availability-recovery/clustered-continuous-replication-failover-standby-continuous-replication-part2.html)


Get-storagegroup -server priexs01ccr | Restore-StorageGroupCopy -StandbyMachine Secexs01-1 -Force


Get-Storagegroup -server priexs01ccr | Disable-StorageGroupCopy -StandbyMachine Secexs01-1 -Confirm:$false


(Will most likely return errors)

Get-storagegroupcopystatus -server priexs01ccr -StandbyMachine Secexs01-1

(This is to verify that the StgCopy returns not configured)

DNS: change IP to new CMS IP

Verify the id used for cluster service has change computer perm in AD.
DO NOT RUN /NEWCMS unless you have MS on the phone and they tell you to.

Run the following with the correct info:
setup.com /RecoverCMS /CMSName:CCREX01 /CMSIPAddress:172.16.6.153

(Pasted from http://www.msexchange.org/articles_tutorials/exchange-server-2007/high-availability-recovery/clustered-continuous-replication-failover-standby-continuous-replication-part2.html)

This is what we actually did with MS support:

Setup.com /RecoverCMS /CMSName:priexs01ccr /CMSIPAddress:10.100.1.43

Get-MailboxDatabase -Server priexs01ccr | Set-MailboxDatabase -AllowFileRestore:$True

Get-MailboxDatabase -Server priexs01ccr | Mount-Database


Get-MailboxDatabase -Server priexs01ccr -Status |ft *name*,*mount*

(Creates a formated list with status)

Verify Allow restore is no longer checked on SGs, this should occur automatically after the DBs mount, but just in-case.

9/30/2008

Disable activesync for all mailboxes:
 
get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$False
 


2/29/2008

Windows::Exchange 2007::Power Shell


Cryptic result from Get-StorageGroupCopyStatus
Get-StorageGroupCopyStatus ExchMbx01ccr\TestStg01 -StandbyMachine ExchDR
Resulted in SummaryCopyStatus = "not configured"
Documentation on TechNet did not even list "not configured" as a possible value.

It turns out that the server name was incorrect.

Get-StorageGroupCopyStatus ExchMbx01ccr\TestStg01 -StandbyMachine ExchDR01
Results in SummaryCopyStatus = "Healthy"

1/05/2007

Migration from GroupWise to Exchange



I have just a few users and the only data available is the "cache mode" copy on a laptop.

Search Results Page: "Instructions on exporting mail to a PST file from GroupWise using Outlook."

-Install the GroupWise Client.
-Install the Outlook 2002 Client.
-Load GroupWise Client and login as the user.
-Launch Outlook (this will connect to the GroupWise account that you are currently logged into).