Thursday, 12 October 2017

Sync the time on Windows Server 2008 R2/ 2012 R2 with the internet

Following are the steps that can be followed in order to sync your domain time with local time zone. 

Open command prompt run as administrator. 
First, locate your PDC Server. Open the command prompt and type: C:\\>netdom /query fsmo
Log in to your PDC Server and open the command prompt.
Stop the W32Time service: C:\\>net stop w32time
Configure the external time sources, type: C:\\> w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov
Make your PDC a reliable time source for the clients. Type: C:\\>w32tm /config /reliable:yes
Start the w32time service: C:\\>net start w32time
The windows time service should begin synchronizing the time. You can check the external NTP servers in the time configuration by typing: C:\\>w32tm /query /configuration
Check the Event Viewer for any errors.



Tuesday, 6 September 2016

Cannot connect Office 365 email with Outlook 2010 Getting error as "Trying to connect" or Outlook 2010 asking for password again and again



If you are unable to connect to Office 365 email with Outlook 2010 Getting error as "Trying to connect" or Outlook 2010 asking for password again and again

The resolution to this issue is simple Please follow the below to the letter and I guarantee it will work.

Install Microsoft Office 2010 SP2. Make sure you have followed this step as its very important. SP2 contains bug fixes regarding the subject issue.
Restart if required,
now remove all email profiles on the machine via the mail (32bit) utility
Create a new mail profile and open Outlook
When the wizard loads choose to configure a new exchange account
For the server enter: outlook.office365.com
Email and password should be the Office 365 email and password
Click "More Settings" in the bottom right
Under the Advanced tab uncheck "Download shared folders".
Under the security tab, in the "Logon network security" drop-down select Anonymous Authentication.
Under the 'connection' tab check "Connect to Microsoft Exchange using HTTP".
Click "Exchange Proxy Settings" use the URL: outlook.office365.com
Tick "Only connect to proxy servers that have this principal name in their certificate" and enter: msstd:outlook.com (Please be aware that there's a typo in the screenshot below; the description here is correct.)
Check both the checkboxes
Under "proxy authentication settings" drop down select "Basic Authentication".
Now reload Outlook and sign in at the first prompt. Be sure to check "Remember password".
It will work surely without any issue. 

Thursday, 31 December 2015

Installing Exchange Server 2016 on Windows Server 2012 R2

 Installing Exchange Server 2016 on Windows Server 2012 R2

Exchange Server 2016 can be installed on Windows Server 2012 and Windows Server 2012 R2. For both versions of Windows Server either the Standard or Datacenter edition can be used to run Exchange Server 2016. Exchange itself does not rely on any specific features of either the Standard or Datacenter editions.
Note that a full server installation with GUI is required for Exchange Server 2016, it can’t be installed on a Core mode installation of Windows Server.
There are three possible installations of Exchange Server 2016 that you can perform:
  • Mailbox server role (this is the only mandatory server role)
  • Edge Transport server role (this is optional, and can’t co-exist with the Mailbox server role on the same Windows Server)
  • Management Tools (for admin workstations or servers)
The requirements for each installation type are different, so let’s look at each of them in turn.

Installing Pre-Requisites

For an Exchange Server 2016 Mailbox server installation open an elevated (run as administrator) PowerShell console and run the following command to install the operating system roles and features.

 C:\> Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation

A restart is required after the roles and features have finished installing.

After the restart download and install (in order):
The server is now ready to install Exchange Server 2016.

Installing Exchange Server 2016

Before you start there are a few things to be aware of:
  • Installing Exchange Server 2016 requires an Active Directory schema update. We’ll look at that in more detail shortly.
  • Aside from the schema update installing Exchange Server 2016 makes other irreversible changes to your Active Directory forest. If you’ve never backed up your Active Directory, or you’ve never heard of a forest recovery, here’s some reading for you.
  • If you’re installing Exchange into the forest for the first time you will be choosing an organization name. The Exchange organization can’t be renamed at a later date, so choose a name you’re happy with keeping forever.

    Preparing Active Directory

    A new installation of Exchange Server 2016 involves applying an Active Directory schema update, as do most Exchange Server cumulative updates, as well as preparing the Active Directory domains where Exchange Server 2016 and any mail-enabled objects will be located. In an Active Directory forest with a single domain this can all be performed as one task.
    The Active Directory schema update will automatically apply when you run Exchange Server 2016 setup on the first server in your environment. A Windows Server 2012 R2 server with the Exchange Server 2016 Mailbox server role pre-requisites installed doesn’t quite meet the requirements (you’ll need to add the RSAT-ADDS feature as shown below). A domain controller will have RSAT-ADDS installed already, but may also need the .NET Framework version shown below to be installed first.
    Whether you’re running the schema update from an Exchange server or a separate server (some organizations do it as a separate task due to change control reasons, or because of different teams having different administrative responsibilities in the environment) then the following requirements apply:
  • .NET Framework 4.5.2 must be installed
  • The RSAT-ADDS feature must be installed
        C:\> Install-WindowsFeature RSAT-ADDS
  • The forest functional level must be at least Windows Server 2008
  • The account used to run the schema update and Active Directory preparation must be a member of Enterprise Admins and Schema Admins. These are high privilege groups I recommend you plan to remove your account from the groups when you’re done with this task. Note, if you’ve just added yourself to these groups you’ll need to log out and back in to the server for the new group membership to take effect.
  • The server you’re running the schema update from must be located in the same Active Directory site as the Schema Master. You can identify your Schema Master by running my Get-ADInfo.ps1 script, or by using the Get-ADForest PowerShell cmdlet.
    Extract the Exchange Server 2016 setup files into a folder, open a command prompt window, and then navigate to the location where the Exchange setup files were extracted.
    To apply only the schema update run the following command after navigating to setup folder in cmd:

    setup /PrepareSchema /IacceptExchangeServerLicenseTerms

To prepare Active Directory run one of the following commands. Note this will also apply the schema update if you did not perform that step already.
If you do not already have an Exchange organization you’ll need to provide a name for the organization now, for example:

setup /PrepareAD /OrganizationName:"xyz" /IacceptExchangeServerLicenseTerms

If you’re installing Exchange Server 2016 into an existing Exchange organization you do not need to specify the organization name

After this open the extracted exchange 2016 folder and double click setup file to proceed and the installation from there onwards is simple GUI navigation.

For further queries you may contact me:
 Muhammad Yaseen
 Phone:   0092-312-5166589
 Email:    yaseenraja2000@gmail.com
 Skypeid:  myaseen789

Wednesday, 30 December 2015

Difference between simulation and emulation

Difference between simulation and emulation


Simulation

A simulation is a system that behaves similar to something else, but is implemented in an entirely different way. It provides the basic behaviour of a system, but may not necessarily adhere to all of the rules of the system being simulated. It is there to give you an idea about how something works.
Example
Think of a flight simulator as an example. It looks and feels like you are flying an airplane, but you are completely disconnected from the reality of flying the plane, and you can bend or break those rules as you see fit. For example, fly an Airbus A380 upside down between London and Sydney without breaking it.

Emulation

An emulation is a system that behaves exactly like something else, and adheres to all of the rules of the system being emulated. It is effectively a complete replication of another system, right down to being binary compatible with the emulated system's inputs and outputs, but operating in a different environment to the environment of the original emulated system. The rules are fixed, and cannot be changed, or the system fails.
Example
The M.A.M.E. system is built around this very premise. All those old arcade systems that have been long forgotten, that were implemented almost entirely in hardware, or in the firmware of their hardware systems can be emulated right down to the original bugs and crashes that would occur when you reached the highest possible score.

Tuesday, 29 December 2015

Microsoft Exchange EMS usefull commands(Handy for troubleshooting) help for Exchange Admins

Get-ExchangeServer
As with most PowerShell cmdlets you can control the output display by piping the output into Format-List (or Format-Table).

Get-ExchangeServer -Identity ExSv1 | Format-List

Note 2:  If you want to focus on just one server append the -Identity parameter.
List the Get-ExchangeServer Parameters

Extend your scripting capabilities by getting to know more parameters:

Get-Help Get-ExchangeServer

Use the information to specify the status because it forces the cmdlet to include real-time information.  For example, try this script with and without the -Status switch.

Get-ExchangeServer -Identity ExSv1 -Status | Format-List


----------------------------------------------------------------

Test-servicehealth

Will test all the services running and tells us about the services that are not runnung. Helpfull for troubleshooting.



------------------------------------------------------------------


get-command -noun add*
will show all commands with noune "add"

get-command -verb test*
will show all commands with verb "test"

get-help test-servicehealth -examples
will privide help with examples regarding the specific command test-servicehealth

---------------------------------------------------------------------


gpresult /v command is very useful to check the gpo being applied and also to troubleshoot regarding GPO's.


------------------------------------------------------------------------

If you need to check the white space

Get-MailboxDatabase Database1 -Status | FL AvailableNewMailboxSpace

Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

------------------------------------------------------------------------
administrative share checking command:
You can see your shared folders by going to Start >Run > type fsmgmt.msc > Shared Folders

------------------------------------------------------------------------

to check the version of exchange



Get-Command Exsetup.exe | ForEach-Object {$_.FileVersionInfo}

-------------------------------------------------------------------------

to check the mailbox whitespace

Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

---------------------------------------------------------------------------

to check the version service pack sp of exchange

Get-ExchangeServer | select name,admindisplayversion


--------------------------------------------------------------------------------

which users are in which mailbox database on Exchange

Get-Mailbox | Sort database, name | Format-Table name, database

 This one will give you all mailboxes on all databases listed in order

get-mailbox | sort database, name | format-table name, database

This one will give you all mailboxes on a specific database,

Get-MailboxDatabase *name_of_database* | Get-mailbox

This one will give you all the mailboxes sorted by size, largest first, in a given database or all databases and export to a text file on the C drive,

Get-MailboxDatabase "<insert database name or don’t enter one for all DB’s>" | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount (optional | Select –first 25) >> C:\*name_of_file*.txt.

-------------------------------------------------------------------------------


To get a count of all mailboxes in the Exchange 2010 organization use the following command:

(Get-Mailbox).count



Note that if you know your organization has over 1000 mailboxes you need to make sure that the result size of the command output is not limited.

(Get-Mailbox -resultsize unlimited).count



Next, we can get a count of mailboxes per Exchange 2010 mailbox server.

Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count

We can also get a count of mailboxes per database in the Exchange organization.

Get-Mailbox | Group-Object -Property:Database | Select-Object name,count

--------------------------------------------------------------------------------------------------------------------

To get a count of all mailboxes in the Exchange 2010 organization use the following command:

(Get-Mailbox).count



Note that if you know your organization has over 1000 mailboxes you need to make sure that the result size of the command output is not limited.

(Get-Mailbox -resultsize unlimited).count



Next, we can get a count of mailboxes per Exchange 2010 mailbox server.

Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count

We can also get a count of mailboxes per database in the Exchange organization.

Get-Mailbox | Group-Object -Property:Database | Select-Object name,count

----------------------------------------------------------------------------------------------------------------------------------

Counting Exchange Server 2010 Total Mailboxes with Exchange management shell

For an Exchange administrator there are a lot of different situations in which they may need to know how many mailboxes are in the organization.  Fortunately this is made easy in Exchange Server 2010 with a few simple EMS commands.


To get a count of all mailboxes in the Exchange 2010 organization use the following command:
(Get-Mailbox).count
 
Note that if you know your organization has over 1000 mailboxes you need to make sure that the result size of the command output is not limited.
(Get-Mailbox -resultsize unlimited).count
 
Next, we can get a count of mailboxes per Exchange 2010 mailbox server.
Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count

We can also get a count of mailboxes per database in the Exchange organization.
Get-Mailbox | Group-Object -Property:Database | Select-Object name,count

As you can see the Group-Object command allows us to see a count of mailboxes based on different attributes or properties of the mailbox. For example a count of mailboxes that are and are not exempt from email address policies.
Get-Mailbox | Group-Object -Property:EmailAddressPolicyEnabled | Select-Object name,count

And as a final example, a count of mailboxes by Office (notice that the 6 mailboxes with a null value are still included in the results).
Get-Mailbox | Group-Object -Property:Office | Select-Object name,count 
 
 

Unable to Mount Database Exchange 2010 getting error message as "MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0x80004005, ec=-528)" fix

In this blog I am going to teach you how to fix the database if you are unable to Mount Database Exchange 2010 getting error message as below:

 Error:


Failed to mount database 'MailboxDatabase02'.

MailboxDatabase02
Failed
Error:
Couldn't mount the database that you specified. Specified database: MailboxDatabase02; Error code: An Active Manager operation failed. Error The database action failed. Error: Operation failed with message: MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0x80004005, ec=-528)
. [Database: MailboxDatabase02, Server: MAIL.aspirationscare.com].
An Active Manager operation failed. Error The database action failed. Error: Operation failed with message: MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0x80004005, ec=-528)
. [Database: MailboxDatabase02, Server: MAIL.aspirationscare.com]
An Active Manager operation failed. Error Operation failed with message: MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0x80004005, ec=-528)
. [Server: MAIL.aspirationscare.com]
MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0x80004005, ec=-528)

Cause:

This issue may occur in an Exchange log file that has a mismatching signature and LGeneration. Typically, the Exchange log file is the E00.log file. If the E00.log file has a mismatching signature, the information store might not mount even if the database is consistent.
Or you have deleted the log files accidentally or  for space creation.

Fix:

First thing you want to check is to make sure the name of the database file matches what Exchange is expecting. You can check that in the properties of the database under the Org Configuration.
Second thing is to check what state the database is in using eseutil. If it's in a dirty shutdown state, you'll have to repair it.
Here is how to check the state of the database (I HIGHLY recommend a backup of the DB path contents before you do any of this):
Example (Replace the path with the one in your enviroment):
eseutil /mh "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"
If it's dirty shutdown(after running the command you will get the results):
Then run the below mentioned command:
eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"
Check the state again and if you have a Clean Shutdown state.
 After this navigate to your Database path i.e: in my case "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database" and delete the current "E00.log" file and create a new one "E00.log" file.
Make sure you follow the same procedure as mentioned in the blog. The deletion and creation of new E00.log transition log file is mandatory.  

Go to Exchange Management console and mount the database and wollaaa It will mount the database successfully. Remember me in your prayers.

For further queries you may contact me:

Muhammad Yaseen

Tel: 0092-312-5166589

Email: yaseenraja2000@gmail.com