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