This script help for finding email flow latency between the servers.
This will be most useful when you have the exchange servers across the
site and perform the mail flow routing.
It works on getting
the local server name as source server name and queries each target
mailbox servers which is denoted in the array.
$filePath = "C:\temp\Raji\output.txt"
$array = @("MBX1.mail.com","MBX2.mail.com ","MBX3.mail.com ","MBX4.ad.aricent.co.mail.com")
$SourceServer = $env:COMPUTERNAME
ForEach ($TargetServer in $array)
{
Write-host Testing Mailflow from $SourceServer to $TargetServer -foregroundcolor cyan
Add-Content $filePath "Testing Mailflow from $SourceServer to $TargetServer"
$Output = Test-Mailflow -SourceMailboxServer $SourceServer -TargetMailboxServer $TargetServer | FT -Autosize
Write-Output $Output
$Output | Out-File -filePath $filePath -append -encoding ASCII
}
Just change the File path in the Email Flow Script and you can get the output as out.txt file
The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.
Thursday, April 24, 2014
Tuesday, April 22, 2014
Exchange Server SP1 Upgradation – Things to be considered
- Don’t execute the setpup.exe /prepareschema /iacceptexchangeserverlicenseterms of Exchange Server 2013 SP1 in the Windows PowerShell. Instead open the command prompt and execute it.
Reason:
when you execute in windows PowerShell it will load the CU3 setup.exe
but when you execute in Command prompt it loads SP1. Find the screenshot
as follow.
Setup.exe in Command Prompt: Check the Banner ((It shows SP1)
Setup.exe in Windows Powershell: Check the Banner :) (It shows CU3)
- Always use Run-As Administrator on the setup.exe when you try to install them in the GUI mode or else you will overcome some error message on access privilege on running the Exchange 2013 Setup
Sunday, April 20, 2014
Step by Step: Export Yahoo Email to Hotmail Account
The below article explains the step by step detail on how to export the Yahoo emails to the Hotmail \Outlook.com Account.
Now checkout the Hotmail account and you see new folder holding all the yahoo email. If you want all the upcoming emails to moved to hotmail then configure forwarders
Now you have single console having both the Outlook.com and Yahoo email..:)
- Login to the Hotmail account – Click Options
- Select Import Email Accounts tab
- Select the Yahoo account
- Enter your yahoo email address and the password. Select the appropriate option you need for importing your emails
Now checkout the Hotmail account and you see new folder holding all the yahoo email. If you want all the upcoming emails to moved to hotmail then configure forwarders
Now you have single console having both the Outlook.com and Yahoo email..:)
Friday, April 11, 2014
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay
You may receive the below error message when you try to execute PowerShell script to trigger email
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay
At C:\Temp\Get-ExchangeEnvironmentReport.ps1:1096 char:2
+ Send-MailMessage -Attachments $HTMLReport -To $MailTo -From $MailFrom -Subject ..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpFailed RecipientException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
To fix it out follow the below solution
Right click on McAfee icon
Click on Virus Scan Console
Double click on Access Protection on VirusScan Console - On Access Protection tab
Go to Anti-Virus Standard Protection - On right hand side, double click on Prevent mass mailing
worms from sending mail
On process to exclude tab, add PowerShell.exe at the end
Click ok
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay
At C:\Temp\Get-ExchangeEnvironmentReport.ps1:1096 char:2
+ Send-MailMessage -Attachments $HTMLReport -To $MailTo -From $MailFrom -Subject ..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpFailed RecipientException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
To fix it out follow the below solution
Right click on McAfee icon
Click on Virus Scan Console
Double click on Access Protection on VirusScan Console - On Access Protection tab
Go to Anti-Virus Standard Protection - On right hand side, double click on Prevent mass mailing
worms from sending mail
On process to exclude tab, add PowerShell.exe at the end
Click ok
Thursday, April 10, 2014
SID history using PowerShell command
This
is not the SID of ice age it regards to the security identifier of an
object located in Active Directory. The user account SID can be
extracted using the PowerShell cmdlet and modified them easily.
To find the properties of user with SID history detail
Get-ADUser "Mail.COM/Region/Asia/Rajis" –properties sidhistory
To search user on specific OU or domain
Get-ADUser -fILTER {nAME -eq "Rajis"} -SearchBase "OU=Asia,OU=Region,DC=MAIL,DC=COM" –properties sidhistory
To remove SID history value as
Get-ADUser -fILTER {nAME -eq "Rajis"} -SearchBase "OU=Asia,OU=Region,DC=MAIL,DC=COM" –properties sidhistory | foreach {Set-ADUser $_ -remove @{sidhistory=$_.sidhistory.value}}
To find the properties of user with SID history detail
Get-ADUser "Mail.COM/Region/Asia/Rajis" –properties sidhistory
To search user on specific OU or domain
Get-ADUser -fILTER {nAME -eq "Rajis"} -SearchBase "OU=Asia,OU=Region,DC=MAIL,DC=COM" –properties sidhistory
To remove SID history value as
Get-ADUser -fILTER {nAME -eq "Rajis"} -SearchBase "OU=Asia,OU=Region,DC=MAIL,DC=COM" –properties sidhistory | foreach {Set-ADUser $_ -remove @{sidhistory=$_.sidhistory.value}}
Wednesday, April 9, 2014
Extracting the specific content line from huge log file using PowerShell command
Sometimes it will so be difficult to
search a line which it has the specific word or content using Ctrl+F in
the huge log file. Found out a easiest way that will very much useful
for our daily task
PS C:\Temp> dir .\Winstore.LOG | Select-String "Build"
If you want to search in multiple file
PS C:\Temp> dir .\Winsto*.LOG | Select-String "Build"
If you want to export the output to text file
PS C:\Temp> dir .\Winsto*.LOG | Select-String "Build" > Output.txt
Note: You can’t get output if you used Export-CSV cmdlet & this search can be done only notepad format files
Tuesday, April 8, 2014
Basic Troubleshooting Analysis using Task Manager & Resource Monitor
We know the task manager can help to
know the detail of service, processor and memory utilization but it has
capability to perform more than that…
Opening new task when everything got hanged in our system.
- Press Ctrl+Alt+Del – Click TaskManager
- Goto Task Manager – File – Run New Task
- Enter the name of the task you need to open
To identify and kill specific service for the application
Sometime
we have opened serveral application for the same service and need to
get killed specific application. For example let us open multiple
notepad file which points the same service notepad.exe
In
case if you want to kill specific notepad file you need to identity the
service name that should be killed. By default it just show notepad.exe
without much detail. To make it more detail right click – Select
Columns
In the Select Column – Select Command line – Click OK
Now you can able to identify the notepad.exe service that is mapped respective notepad file
Identifying the port number and protocol used by application
Go to Task Manager – Click Performance Tab – Click Resource Monitor
Select the process the need to be monitored.
Go to the network tab where you can able to see the local port and remote port of the application used
Thursday, April 3, 2014
Microsoft SQL Server 2014 Ebook
A basic technical guide of Microsoft SQL Server 2014 was released for free of cost.
You can download the copy from the below url
http://blogs.msdn.com/b/microsoft_press/archive/2014/04/02/free-ebook-introducing-microsoft-sql-server-2014.aspx
You can download the copy from the below url
http://blogs.msdn.com/b/microsoft_press/archive/2014/04/02/free-ebook-introducing-microsoft-sql-server-2014.aspx
Wednesday, April 2, 2014
Microsoft SQL Server 2014
Microsoft has launched SQL server 2014 you can download them from the below site
http://technet.microsoft.com/en-US/evalcenter/dn205290.aspx
New features in SQL Server - http://msdn.microsoft.com/en-us/library/bb500435%28v=sql.120%29.aspx
SQL Server 2014 Product Guide - http://www.microsoft.com/en-in/download/details.aspx?id=39269
Microsoft SQL Server 2014 Logo
http://technet.microsoft.com/en-US/evalcenter/dn205290.aspx
SQL Server 2014 Product Guide - http://www.microsoft.com/en-in/download/details.aspx?id=39269
Microsoft SQL Server 2014 Logo
Subscribe to:
Posts (Atom)
The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.