Categories
Exchange Server 2010

Exchange 2010: Troubleshooting Public Folder Referrals

Exchange 2010: Troubleshooting Public Folder Referrals

I had an issue today where a user from another Mailbox server/domain (same forest/Exchange Org) was unable to access public folders on a different Exchange server.

It turned out that the users home Public Folder Database had been configured to allow refferals to only a single server. To identify this I used the following Exchange Shell Command:

{code lang:css title:”Exchange Shell Command” lines:false hidden:false}

$pfdb = Get-PublicFolderDatabase -IncludePreExchange2010

$pfdb | select-object servername,name,UseCustomReferralServerList,CustomReferralServerList | ft

{/code}

 

To resolve the issue the Exchage Admin needed to add the destination Public Folder Database Servers to the CustomReferralServerList.

Categories
Microsoft

SCCM : Client Site Code Change

SCCM : Client Site Code Change

I had a need recently to change the site code of some SCCM cliwents that had already been deployed. I used the following vbScript to change the site code of a client (remotely or locally!), the script can be integrated into a logon script to automate the process if desired:

{code lang:ini title:”vbScript” lines:true hidden:false}’Replace NEW_SITE with your Site Code
sSiteCode = “NEW_SITE”
sMachine = “.”
set oCCMNamespace = GetObject(“winmgmts://” & sMachine & “/root/ccm”)
Set oInstance = oCCMNamespace.Get(“SMS_Client”)
set oParams = oInstance.Methods_(“SetAssignedSite”).inParameters.SpawnInstance_()
oParams.sSiteCode = sSiteCode
oCCMNamespace.ExecMethod “SMS_Client”, “SetAssignedSite”, oParams {/code}

Categories
Exchange Server 2010

Exchange 2010 : OABGen Issues – PublicFolderDatabase

Exchange 2010 : OABGen Issues – PublicFolderDatabase

I came across an issue recently with an Exchange 2010 migration (same Organisation/Forest) where the OAB was not updating. On further investigation I identified that the following events were being logged on the mailbox database servers which were the home mailbox database servers for the affected users:

Log Name:      Application

Source:        MSExchangeSA

Description:

OABGen encountered error 80040111 while cleaning the offline address list public folders under /o=ORGNAME/cn=addrlists/cn=oabs/cn=OABNAME.  Please make sure the public folder database is mounted and replicas exist of the offline address list folders.  No offline address lists have been generated.  Please check the event log for more information.

– \OABNAME   

Using the command Get-OfflineAddressBook | select-object name,PublicFolderDatabase it was possible to identify that the PublicFolderDatabase that the OAB was set to publish to was incorrect.

Unforunately there is not an Esxchange Shell command to change this, you must use ADSIedit. Using ADSIedit browse to the following location, changing the items in bold to match your environment:

“CN=OABName,CN=Offline Address Lists,CN=Address Lists Container,CN=ORGNAME,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=DOMAIN,DC=LOCAL

Right-click this object and select properties. We’re interested in the siteFolderServer attribute – you’ll probably find this is incorrectly set if you’re getting the error above.

Next use the Exchange Shell to get the DN of a Public Folder Database in the same site; get-publicfolderdatabase | select-object DistinguishedName | fl

Copy the DN of the Public Folder Database into the siteServerName attribute of the failed OAB.

Update: 29/09/2011 – You should also confirm the replication scope of the OAB Public Folder mentioned in the error.  

You then have to restart the Exchange information Store service on the affected servers – of course this will interrupt mailbox database connectivity so if you have a DAG then I would suggest you perform failovers to minimise impact – if not then this may be an out of hours change!

Once completed run the Exchange Shell command from above to confirm that the PublicFolderDatabase setting is correct; Get-OfflineAddressBook | select-object name,PublicFolderDatabase

You can also perform an update of the OAB (update-offlineaddressbookname“) and then download it in a cached mode client to confirm functionality.

Categories
Exchange Server 2010

Exchange 2010 : View Transport Server Queue

Exchange 2010 : View Transport Server Queue

Use the following Exchange Shell command to view the current queue o all transport servers:

get-transportserver | get-queue

This can be limited to a subset of servers using the query below. This method of changing the scope of the command relies on you servers having a similar name, in this case all servers start “UK” :

get-transportserver “UK*” | get-queue

Categories
Exchange Server 2010

Exchange 2010 : View Mailbox Database Size

Exchange 2010 : View Mailbox Database Size

Use the following Exchnage Shell command to view the size of ALL Mailbox Databases within your Exchange Organisation.

Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize

You can limit this to particular Databases using the command below, this will return sizing information on Mailbox Databases which have a name starting with “UK” – this could be modified to FR for example if all of your Mailbox Databases in France started with “FR” :

Get-MailboxDatabase “UK*”  -Status | select ServerName,Name,DatabaseSize

Categories
Exchange Server 2003

Exchange 2003 : Manual Log File Cleanup

Exchange 2003 : Manual Log File Cleanup

1) Stop Affected Databases
2) Check Database State;
             Execute: eseutil /MH “<filename>.edb”
             Execute: eseutil /MH “<filename>.stm”

 Check Value of ‘State’ for both – should be Clean Shutdown or Consistent state

 Check Value of ‘ Log Required’ if 0-0 then no logs are required to start the DB,
 otherwise it will tell you the log range required to start the DB.

You can safely remove all the numbered log files that are less than the lowest entry in any Log Required field for any database in the storage group. Remember to move, not delete, the log files. Remember, the most recent logfile will be the prefix, i.e. E00.log as a result the last log in ‘Log Required’ may not exist.

Categories
Windows Server 2003

NAPP : iSCSi Initiator and Snap Server Replacement

NAPP : iSCSi Initiator and Snap Server Replacement

 

Snap Server can have IP address set to 10.10.10.10 by holding down the reset button whilst powering on.

 

Once configured ensure GuardianOS is upgraded to the most recent entitlement.

 

To reconfigure the backup server (normally XX0015.eu01.apmn.org)

  1. Load Microsoft iSCSI initiator
  2. Remove all iScsi Targets under Persistent Targets
  3. Go to Targets > Refresh
  4. Highlight the new Target > Logon > Tick Automatically Restore This Connection
  5. Under Disk Management Partition & Format the drive:
      500GB Drive I:\ ‘Daily Backups’
      Remaining Drive W:\ ‘Weekly Backups’
  6. Verify the Backup Software paths are correct for the Backup to Disk targets.
Categories
Exchange Server 2010

Exchange 2010 : Export-Csv EmailAddressPolicies by Priority

Exchange 2010 : Export-Csv EmailAddressPolicies by Priority

Use the following Exchange Shell command to export EmailAddressPolicy information, yes this is a large command in order to join all of the multi-string values together:

{code lang:xml showtitle:false lines:false hidden:true}Get-EmailAddressPoicy | select-object name,priority,RecipientFilter,RecipientFilterType,IncludedRecipients,EnabledPrimarySMTPAddressTemplate,Enabled,@{name=’ConditionalDepartment’;Expression={[STRING]::JOIN(";",($_.ConditionalDepartment))}},@{name=’ConditionalCompany’;Expression={[STRING]::JOIN(";",($_.ConditionalCompany))}},@{name=’ConditionalStateOrProvince’;Expression={[STRING]::JOIN(";",($_.ConditionalStateOrProvince))}},@{name=’ConditionalCustomAttribute1′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute1))}},@{name=’ConditionalCustomAttribute2′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute2))}},@{name=’ConditionalCustomAttribute3′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute3))}},@{name=’ConditionalCustomAttribute4′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute4))}},@{name=’ConditionalCustomAttribute5′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute5))}},@{name=’ConditionalCustomAttribute6′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute6))}},@{name=’ConditionalCustomAttribute7′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute7))}},@{name=’Conditio,alCustomAttribute8′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute8))}},@{name=’ConditionalCustomAttribute9′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute9))}},@{name=’ConditionalCustomAttribute10′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute10))}},@{name=’ConditionalCustomAttribute11′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute11))}},@{name=’ConditionalCustomAttribute12′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute12))}},@{name=’ConditionalCustomAttribute13′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute13))}},@{name=’ConditionalCustomAttribute14′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute14))}},@{name=’ConditionalCustomAttribute15′;Expression={[STRING]::JOIN(";",($_.ConditionalCustomAttribute15))}},@{name=’RecipientContainer’;Expression={[STRING]::JOIN(";",($_.RecipientContainer))}},@{name=’ObjectClass’;Expression={[STRING]::JOIN(";",($_.ObjectClass))}},@{name=’NonAuthoritativeDomains’;Expression={[STRING]::JOIN(";",($_.NonAuthoritativeDomains))} } | sort-object priority | export-csv C:\export.csv{/code}</p>'</p>’
Categories
SQL

McAfee EPO : Database Managment

McAfee EPO : Database Managment

I recently ran into some issues with a remote sites EPO server. There were seveal issues:

  1. SQL Express Database had grown to 2GB (it was SQL Express 2005 therefore 2GB was the limit)
  2. The drive which the database files were stored was running low on disk space
  3. There were excessive rows in the events table which required purging

Move The Database

— Identify logical file names and file locations for the database you wish to move

select a.name, b.name as ‘Logical filename’, b.filename from sys.sysdatabases a

inner join sys.sysaltfiles b

on a.dbid = b.dbid

 

— Set DB Offline, forcefully

ALTER DATABASE ePO4_SERVER

SET offline WITH  ROLLBACK IMMEDIATE

GO

 

— Copy files to the new location, yes COPY!

— New location D:\Program Files\McAfee\ePO SQL Database

— Old Location C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

— Set Destination NTFS Permissions to Match Source location

 

— Move database files(As there was not enough disk space on the C:\ on SERVER)

ALTER DATABASE ePO4_SERVER

MODIFY FILE ( NAME = ePO4_SERVER,

FILENAME = “D:\Program Files\McAfee\ePO SQL Database\ePO4_SERVER.mdf”)

GO

 

ALTER DATABASE ePO4_SERVER

MODIFY FILE ( NAME = ePO4_SERVER_log,

FILENAME = “D:\Program Files\McAfee\ePO SQL Database\ePO4_SERVER_log.LDF”)

GO

 

ALTER DATABASE ePO4_SERVER

SET online

GO

Cleanup The Database


— Find Out EPO DB Size

EXEC sp_spaceused

 

— Find Table Sizes

select object_name(id) [Table Name],

[Table Size] = convert (varchar, dpages * 8 / 1024) + ‘MB’

from sysindexes where indid in (0,1)

order by dpages desc

 

— Identify Events that can be purged between a specific date/time range

Select ThreatEventid, Count(Threateventid)

FROM EPOEvents

WHERE ReceivedUTC BETWEEN ‘2000-01-01 00:00:00.000’ AND ‘2011-03-31 23:59:59.999’

GROUP BY ThreatEventid

 

— Purge Events

 

— 1 Stop all EPO Sevices

— 2 Backup DB

— 3 Purge table

 

DELETE FROM EPOEvents

WHERE ReceivedUTC BETWEEN ‘2000-01-01 00:00:00.000’ AND ‘2011-05-31 23:59:59.999’

 

— 4 shrink the database

dbcc shrinkdatabase (ePO4_SERVER,1)

Categories
Exchange Server 2007

Troubleshoot OOF

Troubleshoot OOF:

http://www.msexchange.org/articles_tutorials/exchange-server-2007/tools/troubleshooting-out-of-office.html