Friday, March 14, 2014

Troubleshooting Proxy settings from command prompt on MS Exchange server

Please use FQDN not just the domain name in the command.
netsh winhttp set proxy proxy-server="http=<Myproxyserver>:8080;https=<Myproxyserver>:8080" bypass-list= "CASSERVER.DOMAIN.COM"

Please change the relevant field in the above command

We might also need to run this line too:

netsh winhttp set proxy proxy-server="http=172.16.16.100:8080;https=172.16.16.100:8080" bypass-list="172.*;*.mydomain.com;*.local".

and the same can be achieved from Internet Explorer > Tools > Internet Options > Lan settings > Proxy server settings but some times it is good to have settings from Command Prompt

There is a problem with the Proxy servers certificate The name on the security certificate is invalid or does not match the name of the target site "error 10"



Environment
Outlook 2007 
Exchange server 2010 Sp3 CU2

Issue : Outlook users are getting message when starting outlook  "There is a problem with the Proxy servers certificate The name on the security certificate is invalid or does not match the name of the target site "error 10""

There is a problem with the Proxy servers certificate The name on the security certificate is invalid or does not match the name of the target site "error 10"

Resolution : From the services console, Check the "MS Exchange RPC Client Access", if it is stopped, Set it to Start

2. Repair Outlook Profile or create a new Profile for Outlook

3. Check the EXPR value from shell
Get-OutlookProvider | FL

to set the value if you found Empty, then value using set-outlookprovider  

What and why we run the Set-OutlookProvider

The OutlookProvider is the simple "RPC over HTTP" and so what it means that "RPC over HTTP" protocol allows Outlook Mapi clients to connect Exchange server using HTTP or most of the time when Internal users are connected from home or from Outside LAN connected through Internet so another words MAPI packets are encapsulated into HTTP  and the cmdlet Set-OutlookProvider allows modifying related settings. As we can see in the table below, the parameters Server and CertPrincName only apply to Outlook EXPR provider - Outlook Anywhere clients. By default both values are set to $null.

the syntex for Outlook Provider is 

Set-outlookProvider EXPR -CertPrincipalName msstd:*.domain.com -Server mail.domain.com

where msstd stands for Microsoft Standard Format and in code and it is only there to increase security by telling Outlook to only connect to the server is the "Subject Name" and "Principal Name" mentioned in the Certificate and if you have wildcard certificate, autodiscover will not set msstd value automatically for you and you need to set the value by running the command 

Set-Outlookprovider EXPR -CertPrincipalName msstd:*.domain.com

how to find value for OutlookProvider MSSTD and "CertPrincipalName" 
If the setup was working then you can go to the Outlook > Tools > Settings > Email > properties of the Email > More settings > Connection  > "Exchange Proxy Settings" 


"Use this URL to connect to my proxy server for Exchange"  value goes into "Server"

and  Under "Connect using SSL only" option "Only connect to Proxy servers that have this Principal Name in their Certificate" value goes to "CertPrincipalName" and value should correctSubjectName.domainname.com


So considering the same example for few options
Set-outlookProvider EXPR -CertPrincipalName msstd:Subjectname.domain.com -Server mail.domain.com

set connection to the server without looking at the Certificate value
Set-outlookProvider EXPR -CertPrincipalName $null -Server mail.domain.com will 

On Fast networks, connect using HTTP then connect using TCP/IP (always HTTP)
set-OutlookProvider EXPR -OutlookProviderFlags:ServerExclusiveConnect

On Slow Networks, Connect using HTTP first, User TCP/IP first then HTTP (default):
Set-OutlookProvider EXPR -OutlookProviderFlags:None
.
http://www.msexchange.org/articles-tutorials/exchange-server-2003/mobility-client-access/outlookrpchttp.html

Wednesday, January 22, 2014

6 interview questions you need to ask

1. "If you stayed with your current company, what would be your next move?"

2. "What makes you stand out from others?"

3. Tell me your greatest accomplishment.

4. "Give me an example of a time when you took the time to share a co-worker's achievement with others."

5. "How many hours a week do you need to work to get your job done?"

6. "Do you take enough time to make a decision?"

from: http://www.microsoft.com/business/en-us/resources/management/recruiting-staffing/hiring-6-interview-questions-you-need-to-ask.aspx?fbid=2uhbb53JOtk

New High Availability Features in Exchange 2010 SP1

New High Availability Features in Exchange 2010 SP1

* Continuous replication - block mode
In the RTM version of Exchange 2010 and in all versions of Exchange 2007, continuous replication operates by shipping copies of the log files generated by the active database copy to the passive database copies. Beginning with SP1, this form of continuous replication is known as continuous replication - file mode. SP1 also introduces a new form of continuous replication known as continuous replication - block mode




* Active mailbox database redistribution
This feature is present in two forms. The first form is a script that can be periodically run by administrators to balance the distribution of active database copies across a database availability group (DAG). The second form we hope to implement is the addition of copy distribution awareness to Active Manager's best copy selection (BCS) process.

* Improved Outlook cross-site connection behavior and experience

* Enhanced datacenter activation coordination support  :  In the RTM version, DAC mode is limited to DAGs with at least three members that have at least 

two or more members in the primary datacenter.

In SP1, DAC mode has been extended to support two-member DAGs that have each member in a separate datacenter. 


* New and enhanced management and monitoring scripts
CheckDatabaseRedundancy.ps1 (new) 
StartDagServerMaintenance.ps1 and StopDagServerMaintenance.ps1 (new)
CollectOverMetrics.ps1 (enhanced)
CollectReplicationMetrics.ps1 (enhanced)


* Improvements in failover performance

http://blogs.technet.com/b/jribeiro/archive/2010/04/26/new-high-availability-features-in-exchange-2010-sp1.aspx

Manually move the Primary Active manager in DAG

Under any circumstances, if you have to move the Primary Active Manager to another server of a DAG then from Exchange management shell use the following command


cluster.exe “DAG Name” /MoveTo:NewDAG

bdat

BDAT
-------------------------------------------------------
The SMTP BDAT command is an alternative to the DATA command, which can be used when a remote SMTP server presents the CHUNKING verb. CHUNKING is an ESMTP functionality. Microsoft Exchange servers implement this feature by default, as do other SMTP servers.

If BDAT is used to transfer emails between two SMTP servers for which the FortiGate unit is performing antivirus session scanning, delivery problems and/or performance problems may occur caused by retransmission attempts.

The problem occurs when multiple email messages are transfered within the same TCP session using multiple BDAT commands. The transfer of a single email per session, with the use of only one BDAT command does not pose a problem.
-------------------------------------------------------

Friday, December 20, 2013

550 5.7.1 Client does not have permissions to send as this sender

​

POP3 and IMAP
-------------------------
Status: offline Clients like IMAP and POP3 uses the Client <servername> Receive -Connector. In order to allow clients to submit messages via this connector, you need to issue below command: 

get-receieveconnector Client <servername> | add-adpermission -user AU -extendedrights ms-Exch-SMTP-Accept-Authoritative-Domain-Sender 
  
Issue 
=============
RE: 550 5.7.1 Client does not have permissions to send as this sender

Resolution
=============

In adsiedit under :  Configuration - Services - Microsoft Exchange - 
<organization name> - Administrative Groups - Exchange Administrative Group
- Servers - <Servername> - Protocols - SMTP Receive Connectors - Client <servername>

Right click and click properties, click the security tab and grant the Authenticated users group the Accept Authoritative Domain Sender allow permission.

Other settings can be checked is as follows

From EMC 
Get-IMAPsettings 
check  logintype,

We checked the settings on the Outlook and is correct. SPA is unchecked.
In Advanced we have IMAP port as 993- SSL.
In outgoing server we have "use same server as incoming server" checked.

Tested mail flow but incoming IMAP passes the test and Sending mail SMTP fails.

Tuesday, December 17, 2013

How Mail from outlook sent to another outlook via Exchange server

The Mail Submissions Service on the Exchange 

2010 Mailbox Server notifies the Hub 



Transport Server that a message is in the Outbox. The 

Store Driver on the Hub Transport 


Server retrieves the message from the Mailbox Server. 

RPC is used for communication between the Hub and the 

Mailbox Server.

Monday, December 16, 2013

Netmon from Command Prompt

Netmon from Command Prompt

Start > Run type CMD click OK. 

cd "c:\Program Files\Microsoft Network Monitor 3"

C:\nmcap.exe /network * /capture /file ExchangeTrace-client.chn:100M 


c:\nmcap.exe /Network * /Capture /CaptureProcesses /File ExchangeTrace.chn:100M


In the below example the client IP is 10.10.50.40 and the server IP is 10.1.75.20
nmcap.exe /Network * /Capture "(ipv4.Address == 10.10.50.40 and ipv4.Address == 10.1.75.20)" /CaptureProcesses /File ExchangeTrace.chn:100M

http://blogs.technet.com/b/kpapadak/archive/2011/01/31/template-how-to-take-network-traces-between-clients-and-exchange-servers.aspx


Netmon Command
IPv4.address == IP address 

Microsoft Exchange server Common Scripts from Exchange Management Shell

How to find Mailbox is Shared Mailbox

C:\Get-mailbox -Resultsize unlimited | Where-object {$_.Isshared -eq $True}



An alternative way to identify possible problematic receive connectors by using Exchange Management Shell, is if the queue delivery type is SmtpRelayToRemoteAdSite. To do this, run the following shell commands:
$remotesite = (get-queue | where {$_.LastError -like "451 4.4.0*"}).NextHopDomain

get-exchangeserver | where {$_.site -like '*'+$remotesite} | get-transportserver | Get-ReceiveConnector | where {$_.Bindings -like '*:25*'} | where {$_.AuthMechanism -notlike '*Exchange*'

From blog 
http://blogs.technet.com/b/rmilne/archive/2014/02/23/exchange-2010-tip-of-the-day-26-to-50.aspx

This command spins through all your mailbox servers and reconnects all the uniquely identified but disconnected mailboxes in any one of the mailbox stores:
$Servers = Get-ExchangeServer 

$Servers | ` 
Where { $_.IsMailboxServer -Eq '$True' } ` | ForEach { Get-MailboxStatistics -Server $_.Name ` 
  | Where { $_.DisconnectDate -NotLike '' } ` | ForEach { Connect-Mailbox -Identity `$_.DisplayName -Database $_.DatabaseName} }


Want to know what version of Exchange Server each of your servers is running? Type:
Get-ExchangeServer | Format-Table Name, *Version*


Want to create a group of test users in your lab? Use this command:
1..100 | ForEach { Net User "User$_" MyPassword=01 /ADD /Domain; Enable-Mailbox "User$_" }


Wednesday, December 11, 2013

File share folder is inaccessible from the Exchange server 2010



File share folder is inaccessible from the Exchange server.

We checked and found the folder permission is fine.

We added the "Exchange subtrusted system", still the same issue.

We click the "Share" under "Network file and Folder sharing" (>apply > OK)



Now issue is resolved.


Friday, December 6, 2013

Definitions

Definitions



  • Stateless protocol


  • In computing, a stateless protocol is a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of requests and responses.


  • AutoDatabaseMountDial

  • lossy failover
  • The default setting is GoodAvailability, which translates to 6 or fewer logs 

  • BestAvailability (12 or fewer logs missing) and Lossless (0 logs missing).


  • from 
  • Host or Local Candidate – The actual IP address bound directly to the remote client’s host operating system.  This could include multiple candidates as the remote host could contain multiple physical or virtual network adapters including any active VPN clients.  Most often this will be a single IP address of the active interface on a Lync client’s workstation.
  • Reflexive or STUN Candidate – The public IP address assigned to the client’s immediate firewall perform network address translation.  In most home networks this would be the public IP addresses assigned by an ISP (either dynamically or statically) to the premises modem or router, depending on the type of service.
  • Relay or TURN Candidate – The publically accessible IP address assigned to the media relay server which is allocated to the client.  In Lync Server this is the public IP address assigned either directly to the external A/V Edge interface or the public IP address allocated to a NAT device (e.g. firewall) which is performing static network address translation to a private IP address assigned directly to the Edge Server.  In the event that an Edge Pool is deployed then this would be the IP address of one of the individual servers in the pool. 





  • Wednesday, December 4, 2013

    scripts to find how many users are logon using OWA

    Method 1: 
    You can find the output when you run get-logonstatistics from the article below:
    View Logon Statistics


    Method 2:
    Besides, you can use logparser to analyze it
    C:\Program Files (x86)\Log Parser 2.2\logparser.exe" "SELECT TOP 10 cs-username, Count(*) AS OWAHits INTO OWAActivity.gif FROM C:\Inetpub\logs\LogFiles\W3SVC1\u_ex*.log WHERE cs-uri-stem LIKE '/OWA/' AND cs-username IS NOT NULL GROUP BY cs-username ORDER BY OWAHits DESC" -charttype:Bar3D -o:CHART -view:ON
    Or:
    "C:\Program Files (x86)\Log Parser 2.2\logparser.exe" "SELECT TO_STRING(time, 'HH') AS Hour, COUNT(*) AS Hits INTO hitPerSecond.jpg FROM C:\Inetpub\logs\LogFiles\W3SVC1\u_ex*.logGROUP BY Hour ORDER BY Hour ASC" -i:IISW3C -o:CHART -chartType:ColumnClustered -chartTitle:"Hourly Hits" -groupSize:420x280

    Method 3:
    We can run the command below to get the current number of outlook or OWA user who is connecting to Exchange Servers.
    Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName  name|ft
    Get-Counter "\MSExchange OWA\Current Unique Users" -ComputerName  name |ft


    OWA session with name of the user
    =======================
    Get-Mailbox | Get-LogonStatistics | Where-Object {$_.ApplicationID -eq "Client=OWA"} | Select-Object UserName,LastAccessTime | ConvertTo-Html -Title "OWA actives sessions" -PostContent "<b>Thierry MILLE (c) 2011</b>" | Out-File C:\owa.htm; Send-MailMessage -From sender@domain.com -To recipient@domain.com -Subject "OWA sessions" -Attachments C:\owa.htm -SmtpServer 127.0.0.1; Remove-Item C:\owa.htm

    Wednesday, November 27, 2013

    Microsoft Exchange 2007 How to find what is inside Mailbox Database from Shell

    In this Article, We are checking various options from the Exchange Management Shell

    To avoid any Permission issue, Run Exchange Management Shell "Run As" Administrator or Account with Full Admin rights






    How to find Mailbox Database
    [PS] C:\>Get-mailboxDatabase

    How to find Mailbox Database
    [PS] C:\>Get-mailboxDatabase | FL Name, StorageGroup, Mounted, BackupInProgress, OnlineMaintenanceInProgress

    How to find Mailbox Database
    [PS] C:\>Get-mailboxDatabase -id "Name of the DB" | Get-Mailbox

    How to find which Mailbox belongs to which Database
    [PS] C:\Documents and Settings\Administrator>Get-mailbox | FL Name, Database

    How to find list of the Mailboxes in Database
    [PS] C:\>Get-mailbox -database "Database name" 

    How to find Total number of Storage group 
    [PS] C:\>Get-StorageGroup 

    How to find list of the Mailboxes in Database
    [PS] C:\>Get-mailbox -database "Database name" 


    How to find list of the Mailboxes in Database
    [PS] C:\>Mount-Database -Id "E2k7\RSG\"Mailbox Database" 

    Understanding CCR log files
    http://blogs.technet.com/b/timmcmic/archive/2009/09/21/log-files-required-to-be-copied-after-an-update-storagegroupcopy-re-seed-has-been-successfully-completed.aspx





    Creating bulk users from Exchange management shell

    Original script From : Script to download


    When you have downloaded and extracted the scripts to your server – open a Powershell Console and navigate to the location where they are located – when there type in:

    .\CreateUsersFromCSV.ps1

    LabUsers01

    When the script executes you will be presented with a Windows “Open” dialog box – navigate to the location where you extracted the files and then choose the sample CSV – see below;

    LabUsers02

    The script will then execute creating each user in your Active Directory Lab environment – the Default password is “Password1” – see below;

    LabUsers03

    When the script has completed – open Active Directory Users and Computers – you will see a new OU called “ExchangeUsers” – within this OU are the new accounts that you can play with – see below;

    LabUsers04

    Enable the users using Power Shell

    Get-User -Filter {Department -Like 8* -And RecipientType -eq User} | % { Enable-MailUser $_ -externalEmailAddress $($_.name)@angrytech.com}

    Another Script
    -------------------------------
    Get-User | Where-Object{$_.RecipientType –eq “User”}
    Get-User –OrganizationalUnit People | Where-Object{$_.RecipientType –eq “User”}
    get-user –organizationalUnit people | where-object{$_.RecipientType –eq “User” -and $_.department –eq “Sales”}
    get-user –organizationalUnit people | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “EXCHANGE1\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database


    Steps
    From the powershell, run the .\CreateUsersFromCSV.ps1
    and the confirm the user from Get-User in Active directory at OU=ExchangeUsers and in the below Exchange shell command rename -OrganizationalUnit People
    Get-user –organizationalUnit people | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “EXCHANGE1\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database

    Run the command from Shell
    get-mailbox | fl name, database and from the resultant replace the Database after Enable-Mailbox -Database ""

    So the new command would be
    get-user –organizationalUnit ExchangeUsers | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “E2K7\First Storage Group\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database


    Here OrganizationUnit is the location from ADUC where Exchange users created
    and E2K7\First Storage Group\Mailbox Database is an example from my E2k7 DB




    Thursday, November 21, 2013

    Post Installing KB 2837618 2768005 Unable to set out of office settings, free busy contains no information

    Issue : 
    --------------------
    After installing KB on Outlook 2013, users are complaining that they are unable to set "Out of Settings" and can't schedule Free busy information after Installing November Security Patches

    but Owa users can set OOF and schedule meetings
    
    
    Error:
    ---------------------
     "Your server location could not be determined."


    WorkAround
    ---------------------
    Creation of new profile while update 2768005 and 2837618 installed on the system, didn't working either, you need to remove both of the update and then create a new Outlook Profile.

    Lots of users are complaining about this issue on Outlook 2013 with Exchange 2007.

    Alternately Quit Outlook and try setting OOF from OWA and log back into Outlook and check if this settings can resolve the issue


    There is no update released as far of now, wait for Microsoft to update about this issue in newer patch or update

    Current issue on Technet http://social.technet.microsoft.com/Forums/en-US/827a12f0-c785-43df-a71f-0b21aeffa176/outlook-2013-freebusy-fails-after-updates?forum=officeitpro

    Wednesday, November 13, 2013

    Inspirational Quotes

    “Experience life in all possible ways –good-bad, bitter-sweet, dark-light, summer-winter. Experience all the dualities. Don’t be afraid of experience, because the more experience you have, the more mature you become.”
    - Osho

    Continuous effort—not strength or intelligence—is the key to unlocking our potential.

    - Winston Churchill

    In order to grow, you must give up the struggle to remain the same, and learn to embrace change at all times.

    –Michael A.  Singer


    “if we do what we resolve to do then we can enjoy unlimited success” –Amit Malviya

    "Focus on where you want to go, not on what you fear." - Anthony Robbins



    Some of my suggestions are easier said than done. Just try. The intention is more important than immediate success. -


    "It's determination and commitment to an unrelenting pursuit of your goal that will enable you to attain the success you seek."


    "Sooner or later, those who win are those who think they can." - Richard Bach


    People only treat you one way …… the way you allow them



    एक छुपी हुई पहचान रखता हूँ, बाहर शांत हूँ, अंदर तूफान रखता हूँ, 

    रख के तराजू में अपने दोस्त की खुशियाँ, दूसरे पलड़े में मैं अपनी 

    जान रखता हूँ।




    One night a father overheard his son pray: Dear God, Make me the kind of man my Daddy is. Later that night, the Father prayed: Dear God, Make me the kind of man my son wants me to be.
    - Anonymous


    The 3 C’s of life: You must make a choice to take a chance or your life will never change





    Sunday, November 10, 2013

    Bulk Mailbox Script



    ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database}

    SAVE THIS AS C:\ENABLEBOX.PS1
    NEXT: Run the Script
    Go to Exchange Management Shell
    You can change the directory to the root by typing cd\ then hit Enter (NOTE: If you just typed the words "then hit Enter" you do not belong working on servers)

    Then type: ./enablebox.ps1

    Just in case you want to enable archive for all users in the csv add this to the above script. 
    Add <| Enable-Mailbox –Archive -ArchiveDatabase "<enter archive db name here>"}> Shown below in its entirety. 

    $mailbox=import-csv C:\<filename>.CSV
    ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database | Enable-Mailbox –Archive -ArchiveDatabase "<enter archive db name here>"}



    Reference : Mailbox Script

    Unable to Mount Exchange 2010 Database on Hyper-V Guest MapiExceptionJetErrorOutOfMemory: Unable to mount database


    Issue : On Exchange 2010 DAG database are not mounting

    Error :
    Couldn't mount the database that you specified. Specified database: DB1; Error code: An Active Manager operation failed with a transient error. Please retry the operation. Error: A transient error occurred during discovery of the database availability group topology. Error: Database action failed with transient error. Error: A transient error occurred during a database operation. Error: MapiExceptionJetErrorOutOfMemory: Unable to mount database. 

    Resolution : 
    In Hyper-V, Shutdown the Exchange VM to reset the Memory to multiple of 1024.
    I reset the memory to 4096 MB and start the Exchange VM.
    Now able to mount the Database.