Wednesday, November 11, 2015

All Exchange server 2013 services not able to start

Description:

The Exchange services not able to restart and have the following event logs

Event ID: 10006
Source:  MSExchange Mid-Tier Storage
Description: Active Manager Client experienced an AD timeout trying to lookup object '' in 00:01:00.

Event ID: 2142
Source: MSExchangeADTopology 
Description: Process Microsoft.Exchange.Directory.TopologyService.exe (PID=) Forest Domain.com. Topology discovery failed, error details. No Minimal Required Number of Suitable Directory Servers Found in Forest Domain.com Site RNS and connected Sites..

Cause:
 Misconfiguration of the Active Directory Global Catalog as we have two options in order to make the Active directory work properly with Exchange which is at the same AD site:
Option 1: Have one Global Catalog server for Each site
Option 2: Have all Active Directory servers a Global Catalog

So incase we have four AD in the same site we cannot have only three of them Global Catalog servers.

Resolution:
Make sure you have correct number of the Global Catalog servers at this site

Friday, September 11, 2015

Prevent Users From Deleting Emails From A Shared Mailbox

To let users only review emails but unable to edit/remove emails in shared mailbox, you can setup the shared mailbox by following the steps below,

1 - Remove the user from the group which has been granted the full access permission on the shared mailbox,
2 - Open the shared mailbox in Outlook with another account who has full access permission on the shared mailbox,
3 - Right click the shared mailbox, click Data File Properties, in Permission tab, click add to add a user, and choose reviewer from the Permission level drop down list,
4 - Right click the inbox folder of the shared mailbox, click Properties, in Permission tab, click add to add the same user, and choose reviewer from the Permission level drop down list,



Then this user can open the shared mailbox in Outlook as usual but only able to view the emails in inbox and unable to edit/remove emails.

Delete a spam or specific Message from all mailboxes on Exchange 2010

The following two method that you can use to delete a spam or specific message from all Mailbox on your exchange server 2010:

Method #1:
Run the following PSCMD for each exchange server that you have, to delete the message with the following criteria (Subject / From | Received / Date).

Get-Mailbox -Database “mailbox server” | Search-Mailbox  -targetmailbox backupmailbox -targetfolder “DeletedMSG” -SearchQuery {Subject:"the subject of the target message" AND From:"Sender email address" AND Sent:"02/12/2014 12:45:00"} -loglevel full -DeleteContent

Method #2:
Run the following two small PS scripts to track and delete the messages.


Tracking:
-----------------
$x = Get-ExchangeServer | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-MessageTrackingLog  -messagesubject "security"  -eventid “deliver” -Start "02/12/2014 12:45:00 PM" -end "02/12/2014 12:47:00 PM" -resultsize "unlimited"
$y = $x|select timestamp, sender, @{l="Recipients";e={$_.Recipients -join " "}}, messagesubject, serverhostname, messageid |Sort-Object -Property timestamp
$y|export-csv c:\temp\tracking.csv

Deletion :
------------
$x=get-content c:\OrderInvoice.txt
foreach ($y in $x)
{
$result=$null
$count=$null
$result=Search-Mailbox -identity $y -SearchQuery 'subject:"OrderInvoice" AND Received:23/11/2014' -DeleteContent -force -resultsize unlimited
$count=$result.ResultItemsCount
add-content C:\result.txt "$count`n"
}
 

Tuesday, May 26, 2015

Repair a suspect Database in SQL

Problem:
Cannot access the SQL database
Cause:
The SQL database is tagged as (suspect) and become corrupted due an unexpected SQL Server Shutdown or power failure.
Resolution:
1.       Open Microsoft SQL Server Management Studio and connect to your database
2.       Click the New Query button
3.       Paste the following SQL script into your New Query.
EXEC sp_resetstatus [Maxreports];
ALTER DATABASE [Maxreports] SET EMERGENCY
DBCC checkdb([Maxreports])
ALTER DATABASE [Maxreports] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ([Maxreports], REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [Maxreports] SET MULTI_USER
4.       Click Execute

Now you should able to access the database :)

Thursday, February 26, 2015

SP 2013: Distributed Cache Service does not support this operation from Central Administration. Please use Sharepoint Powershell commandlets.

Problem:
You cannot change SharePoint Server 2013 Distributed Cache service account using Central Admin site

Resolution:
Use the following PowerShell CMD to Change the managed service account for the distributed cache.

$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
$accnt = Get-SPManagedAccount -Identity Domain\needed-service-account
$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()
$cacheService.ProcessIdentity.Deploy()

Thursday, February 19, 2015

Cannot create virtual machine on System Centre Virtual Machine Manager 2012 R2

Problem: 
Receiving the following Error whenever you try to create VM from the VMM console.

Error (2915)
The Windows Remote Management (WS-Management) service cannot process the request. The object was not found on the server (VMM Server Name).

WinRM: URL: [http://VMM Server Nam:5985], Verb: [ENUMERATE], Resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_VirtualSystemManagementService], Filter: []

Unknown error (0x80338000)

Recommended Action
Ensure that the VMM agent is installed and running. If the error persists, restart the virtualization server (VMM Server Name) and then try the operation again. 

This error can also happen due to an older version of the VMM agent on the virtualization server. Ensure that the VMM agent is upgraded to the latest version, and then try the operation again.

Resolution:

Run the following PowerShell CMDs on all you Hyper-V hosts

1- Import-Module FailoverClusters
2- Get-ClusterResource -c YouHyper-VClusterName | where {$_.resourcetype.name -eq ‘virtual machine configuration’} | Update-ClusterVirtualMachineConfiguration

Thursday, September 25, 2014

Exchange 2013 SP1 CU5: Content index of mailbox databases in Unknown state........and OWA users cannot do search on their mailboxes

Problem: Some user cannot search on their mailboxes using OWA

Cause: Content index of all databases on mailbox servers is not working and showing “Unknown” state.

Resolution: Applying the following actions on above failed mailbox servers.
Ø  Recreate the Search Foundation from scratch
a.       Stop and disable the search services and rename the Data Folder  "C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\HostController\Data"
b.      Open power shell and navigate to C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Installer
c.       Run the command :  .\installconfig.ps1 -action I -dataFolder "c:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\HostController\Data"
d.      Output should be like
                                                               i.      [PS] C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Installer>.\installconfig.ps1 -action I -dataFolder "C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\HostController\Data"
                                                             ii.      Configuring Search Foundation for Exchange....
                                                            iii.      Successfully configured Search Foundation for Exchange
e.      Rename the Index files for the database that are active on the node .
f.        Start the Search Services

Ø  Removed a configuration entry that refers to the ContentSubmitters group. This entry is present in four XML files. Each file is called WcfConfigurator.
a.       you can find each file in the following folder: %ExchangeInstallPath%\Bin\Search\Ceres\HostController\Data\Nodes\Fsis\NODENAME\Configuration\Local
b.      Here, “%ExchangeInstallPath%” is the Exchange installation root path, and the placeholder NODENAME represents one of the following names. (There is one name for each of the four files that are to be edited.)
§  AdminNode1
§  ContentEngineNode1
§  IndexNode1
§  InteractionEngineNode1

                                                         i.            These are text files. You can use Notepad or any other convenient plain text editor to change them. Make sure that you make only the change that is described here.
                                                       ii.            Each file contains at most one line that contains the following: <AuthorizedRole>ContentSubmitters</AuthorizedRole>
                                                      iii.            Remove this line, and then save the file. Repeat this operation for each of the four files, and then restart the Microsoft Exchange Search Host Controller service.
c.       Found the Index files in Crawling state as expected instead of Unknown.


Ø  Once all the Active copies are healthy and still the copies in failed and suspended state, then you can reseed the catalog files only using the below command


Update-MailboxDatabaseCopy -Identity DB\MBserver –CatalogOnly