Friday, May 11, 2012

Configure Protocol Logging in Exchange Server 2010

Get-ReceiveConnector 
Set-ReceiveConnector -Default Receive Connector -ProtocolLoggingLevel Verbose

Get-SendConnector 
Set-SendConnector -Default Send Connector -ProtocolLoggingLevel Verbose

[PS] C:\>Set-TransportServer NY-CAS-2K8 -ReceiveProtocolLogPath  "D:\Message-Log"
[PS] C:\>Set-TransportServer NY-CAS-2K8 -SendProtocolLogPath "D:\Message-Log"
[PS] C:\>Set-TransportServer NY-CAS-2K8 -ReceiveProtocolLogMaxFileSize 30MB
[PS] C:\>Set-TransportServer NY-CAS-2K8 -SendProtocolLogMaxFileSize 30MB
[PS] C:\>Set-TransportServer NY-CAS-2K8 -ReceiveProtocolLogMaxDirectorySize 400MB
[PS] C:\>Set-TransportServer NY-CAS-2K8 -SendProtocolLogMaxDirectorySize 400MB
[PS] C:\>Set-TransportServer NY-CAS-2K8 -ReceiveProtocolLogMaxAge 180.00:00:00
[PS] C:\>Set-TransportServer NY-CAS-2K8 -SendProtocolLogMaxAge 180.00:00:00


Protocol Logging logs all the SMTP conversation occurring between Exchange Server 2010 as part of message delivery. These conversations occur on Send or Receive Connectors that are configured on Exchange Server 2010 Hub Transport or the Edge Transport servers. These log files are helpful for administrators to troubleshoot mail flow problems. By default, protocol logging is disabled on all Send or Receive Connectors. Exchange Server 2010 uses Circular logging to restrict the log file size and file age to help control the hard disk space.
All the Receive Connectors configured on Hub Transport or Edge Transport share the same protocol log files and protocol log options. These log files and log options are different from the Send Connector configured on Hub Transport and the Edge Transport on the same servers.
Enable or disable protocol logging on connectors
You need to be assigned permissions before you can perform this procedure.
  How to configure Protocol Logging on Connectors from the EMC
  1. Perform one of the following steps:
    • On an Edge Transport server, in the EMC, select Edge Transport and then click the Receive Connectors tab in the work pane.
    • On a Hub Transport server, expand Server Configuration and then select Hub Transport. In the result pane, select the server that has the Receive connector you want to modify and then open its Properties.
  2. Click Properties under the name of the Receive Connector.
  3. Click the General tab and use the drop-down box next to Protocol logging level to enable or disable protocol logging. None disables protocol logging, and Verbose enables protocol logging.
  4. Click Ok to save the settings.
The above procedure is similar for Send connectors. To access Send connectors, you will have navigate to Organization Configuration > Hub Transport.

How to Use Shell to Enable or Disable Protocol Logging on Receive Connector
In the below example, we have enabled protocol logging level for the Receive connector "Connection from Techpeoples.net".
Get-ReceiveConnector
Set-ReceiveConnector -Connection from Techpeoples.net -ProtocolLoggingLevel Verbose
How to Use Shell to Enable or Disable Protocol Logging on Send Connector
In the below example, we have enabled protocol logging level for the Send connector "Connection from Techpeoples.net".
Get-SendConnector
Set-SendConnector -Connection from Techpeoples.net -ProtocolLoggingLevel Verbose

How to Configure the Location of the Protocol Log Files
The default location of Receive connector log files are at C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive, and the Send connector protocol log files location is C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpSend.

How to change the location of Receive Connector log files:

Get- TransportServer

Set-TransportServer PC01 -ReceiveProtocolLogPath "C:\Receive SMTP Logs"

How to change the location of Send Connector log files:

Get-TransportServer

Set-TransportServer PC01 -SendProtocolLogPath "C:\Send SMTP Logs"

Log file location can also be changed from the Exchange Console.

How to Configure the Maximum Size of each Protocol Log File
The default size of each protocol log file is 10MB. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum file size of Send and Receive connector from the Shell:-

Set-TransportServer PC01 -ReceiveProtocolLogMaxFileSize 30MB
Set-TransportServer PC01 -SendProtocolLogMaxFileSize 30MB

How to Configure the Maximum Size of each Protocol Log Directory
The default size of each protocol log directory is 250MB. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum directory size of Send and Receive connector from the Shell:-


Set-TransportServer PC01 -ReceiveProtocolLogMaxDirectorySize 400MB
Set-TransportServer PC01 -SendProtocolLogMaxDirectorySize 400MB

How to Configure the Maximum Age of Protocol Log Files
The default age of each protocol log file is 30 days. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum directory size of Send and Receive connector from the Shell:-


Below we are configuring the age limit on Send and Receive connector to 60 days.
Set-TransportServer PC01 -ReceiveProtocolLogMaxAge 60.00:00:00
Set-TransportServer PC01 -SendProtocolLogMaxAge 60.00:00:00

Monday, May 7, 2012

Downgrade: Change Windows 7 Ultimate to Premium or Professional (Step by Step)

  A Windows 7 Ultimate Installation can normally not change into a minor version of "Windows 7 Home Premium" or "Professional". If you have installed a preview version of Windows 7 Ultimate (e.g. beta, release candidate build 7100 or RTM build 7600) and want to install a cheaper version Windows 7 Home Premium or Professional the installation is refused:

 But with a change of a registry key whilst installation you can fake a minor version - so you can install the minor version
Change these registry keys

A re-boot after change of these registry keys is not necessary.
he version name to be entered must be identical to the version name on the installation DVD. See here the differences of an English and a German installation
All data, documents, music and movie files, installed driver and programs, shortcuts, program and user settings are retained. Only in a few Windows 7 programs some settings are reset to the initial settings; e.g. in the "services". After the downgrade the Windows 7 installation, of course, must be re-activated.

Attention: In Windows 7 Ultimate Build 7100 (Release Candidate) the effort is greater. First the entire DVD content must be copied to a folder to the hard drive. Then open in subfolder "sources" the file "cversion.ini" and change the entry "MinClient=7233.0" to "MinClient=7077.0". Then you can start the installation with "Setup.exe" (one folders hierarchy up). After the installation the entire folder can be deleted.

How to Downgrade Windows 7 Ultimate to Professional

Recently I had to install/downgrade one of my friend’s  Windows 7 Ultimate to Professional without format or data lose. I was thinking it could be straight forward and easy since both are same Operating Systems. But, that was not the scene. Ultimate version is the higher version in Windows 7 and it can’t be downgraded to  lower versions officially without formatting or doing a fresh installation. Anyhow, I found a trick to downgrade Windows 7 ultimate to Professional easily without new installation.
I’m not the owner of this trick, but I can confirm this works well.

Before start the installation, just change the two keys in Registry. Its like you are faking the Windows 7 installation that you are using the same version which you are going to install. In my case, I had to change the key to ‘ Windows 7 Professional ’. Make sure you are typing the exact and correct OS version which is written on your installation DVD

 

After you change the registry key, insert the Windows 7 Professional installation medium and start.
Make sure you have enough of space in ‘System Partition’ (usually C drive). Allocate enough of time since this will copy your personal data first, downgrade the OS and then copy back your data.
I suggest to clean up (move to different location) your personal data (such as Desktop, My Documents..etc) before start the downgrade for saving time.
Because of this method worked great for me and I managed to downgrade Windows 7 Ultimate to Professional, I recommend the original source with more details and screen shots.

Recover Hidden Folders and Files Caused By Virus

Steps 1

1. Go to Start > Run > type cmd
2. Dos will open type cd\
3. Now type the drive letter in which you want to Unhide the files lets suppose in my case its E: this will open the E: drive
4. If you want to see all hidden files and folders   type E:\>dir/ah
5. Now type attrib *. -h -s /s /d
6. Now close cmd using exit command

Steps 2 (folder by folder)
1. Go to Start > Run > type cmd
2. Dos will open type cd\
3. Now type the drive letter in which you want to Unhide the files lets suppose in my case its E: this will open the E: drive
4. If you want to see all hidden files and folders   type E:\>dir/ah (*you will now see the files/folders with hidden attributes )
5. Type “attrib [name of file/folder] -r -a -s -h” if you’re going to unhide files, you should type the whole name plus the extension (example: attrib banner.psd -r -a -s -h)
6. Now check you  drive.. it should be there

Friday, May 4, 2012

The terminal server has exceeded the maximum number of allowed connections

If the Session time out is not configured, or the logged on users are not available, you wont be able to logon to the machine. To overcome this limitation, follow the steps as below.

open a command prompt or type in the RUN prompt

mstsc /v:[00.00.00.00/SERVERNAME] /f -console

eg: mstsc /v:192.168.1.10 /f -console
mstsc /v:ADSURF /f -console

This will connect to the physical console session on the server (also known as “session zero”). You will then be prompted with the login box and provide the administrator details. Then you will be connected to the Console Session on the server. Now you can reset the disconnected user sessions from Terminal Services Manager. Please note that if you get disconnected from this console session, you will  have to go physically to the machine.


If you have Windows Vista with SP1, Windows 7 or Server 2008, use the following syntax:

mstsc /admin

If you use the old switch “/console”, it will just ignore that and proceed connecting. In Windows Server 2008, the /console switch doesn’t exist anymore because “session 0″ is a non-interactive session that is reserved for services. Difference between admin and console swtich are hxxp://blogs.msdn.com/b/rds/archive/2007/12/17/changes-to-remote-administration-in-windows-server-2008.aspx


You can also query the sessions on the remote machine as an administrator of that machine. Open a command prompt as a domain administrator that the remote machine is set to or map a drive of that remote machine.

Then in the command prompt, type as below: (Windows Vista SP1 or Windows 7)


query session /server:servername

Replace servername with the remote machine name or IP address.

Now we have the information of all the users/sessions that are active/disconnected on the remote machine. We can now reset one of the session with the following command.

reset session [ID] /server:servername

Replace [ID] with the number from the prevoius output and servername with the remote machine name or IP address. This will reset the session and now you can login using Remote Desktop connection.

Monday, April 30, 2012

Configure Protocol Logging in Exchange Server 2010

Protocol Logging logs all the SMTP conversation occurring between Exchange Server 2010 as part of message delivery. These conversations occur on Send or Receive Connectors that are configured on Exchange Server 2010 Hub Transport or the Edge Transport servers. These log files are helpful for administrators to troubleshoot mail flow problems. By default, protocol logging is disabled on all Send or Receive Connectors. Exchange Server 2010 uses Circular logging to restrict the log file size and file age to help control the hard disk space.
All the Receive Connectors configured on Hub Transport or Edge Transport share the same protocol log files and protocol log options. These log files and log options are different from the Send Connector configured on Hub Transport and the Edge Transport on the same servers.
Enable or disable protocol logging on connectors
You need to be assigned permissions before you can perform this procedure.
 How to configure Protocol Logging on Connectors from the EMC
  1. Perform one of the following steps:
    • On an Edge Transport server, in the EMC, select Edge Transport and then click the Receive Connectors tab in the work pane.
    • On a Hub Transport server, expand Server Configuration and then select Hub Transport. In the result pane, select the server that has the Receive connector you want to modify and then open its Properties.
  2. Click Properties under the name of the Receive Connector.
  3. Click the General tab and use the drop-down box next to Protocol logging level to enable or disable protocol logging. None disables protocol logging, and Verbose enables protocol logging.
  4. Click Ok to save the settings.
The above procedure is similar for Send connectors. To access Send connectors, you will have navigate to Organization Configuration > Hub Transport.

How to Use Shell to Enable or Disable Protocol Logging on Receive Connector
In the below example, we have enabled protocol logging level for the Receive connector "Connection from Techpeoples.net".
Set-ReceiveConnector -Connection from Techpeoples.net -ProtocolLoggingLevel Verbose
How to Use Shell to Enable or Disable Protocol Logging on Send Connector
In the below example, we have enabled protocol logging level for the Send connector "Connection from Techpeoples.net".
Set-SendConnector -Connection from Techpeoples.net -ProtocolLoggingLevel Verbose

How to Configure the Location of the Protocol Log Files
The default location of Receive connector log files are at C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive, and the Send connector protocol log files location is C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpSend.

How to change the location of Receive Connector log files:
Set-TransportServer PC01 -ReceiveProtocolLogPath "C:\Receive SMTP Logs"

How to change the location of Send Connector log files:
Set-TransportServer PC01 -SendProtocolLogPath "C:\Send SMTP Logs"

Log file location can also be changed from the Exchange Console.

How to Configure the Maximum Size of each Protocol Log File
The default size of each protocol log file is 10MB. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum file size of Send and Receive connector from the Shell:-

Set-TransportServer PC01 -ReceiveProtocolLogMaxFileSize 30MB
Set-TransportServer PC01 -SendProtocolLogMaxFileSize 30MB

How to Configure the Maximum Size of each Protocol Log Directory
The default size of each protocol log directory is 250MB. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum directory size of Send and Receive connector from the Shell:-


Set-TransportServer PC01 -ReceiveProtocolLogMaxDirectorySize 400MB
Set-TransportServer PC01 -SendProtocolLogMaxDirectorySize 400MB

How to Configure the Maximum Age of Protocol Log Files
The default age of each protocol log file is 30 days. All Receive connectors on the server share the same protocol log files and all Send connectors on the same server share the same protocol log files. When this limit is reached, a new protocol log file is created until the protocol log directory reaches its specified maximum size or a protocol log file reaches its specified maximum age. Circular logging deletes the oldest log file after the maximum size or maximum age limit is reached.

We cannot use the Exchange Console to change the maximum size of each protocol log file:
Below we have used to syntax to change the maximum directory size of Send and Receive connector from the Shell:-


Below we are configuring the age limit on Send and Receive connector to 60 days.
Set-TransportServer PC01 -ReceiveProtocolLogMaxAge 60.00:00:00
Set-TransportServer PC01 -SendProtocolLogMaxAge 60.00:00:00