Windows

One-Liner: Open Start Menu From Powershell

Working on Windows Server 2008 in a RemoteDesktoption (remote desktop inside remote desktop inside remote desktop), It’s a challenge to point the mouse curser to the exact lower left pixel to open the start menu.

Good News, Just open Powershell, and past this one-liner to simply open the start menu  without changing anything or creating any files on the server.

 $wshell = New-Object -ComObject wscript.shell;$wshell.SendKeys('^{ESC}')

P.S.: Of course you can also create a VBS script to do same. but in my case, this wasn’t preferable.

Configure The Windows Services Recovery Options From Command Line

The command will configure the recovery options for a given service as:

  • First Failure: Restart the Service
  • Second Failure: Restart the Service
  • Subsequent failures: Take No Action (this is set to “take No Action” to avoid infinite restart attempts)
  • Restart Fail Count After: 1 Day
  • Restart Service After: 1 minute

2014-11-02 14_08_32-Remote Desktop Manager [Quick connect - EGCTRX01DR] - Trial version expire in 5

SC failure <Service Name> actions= restart/60000/restart/60000/""/60000 reset= 86400

Example for Message Queuing service:

SC failure MSMQ actions= restart/60000/restart/60000/""/60000 reset= 86400

Internet Explorer 9 Group Policy Preference

So, we know that IE9 was released after Windows Server 2008 R2,

And if you tried to create a GPO preference on Windows 2008 R2 Domain Controller  for Internet Explorer you will find options for:

– Internet Explorer 5 and 6

– Internet Explorer 7

– Internet Explorer 8

Lets Open Group Policy Management Console on Windows 2008 R2 domain controller and see:

Start –> Run –> GPMC.MSC –> Expand the nodes and select any group policy –> Right Click and click Edit you will see:

 

image

Under User Configuration –> expand Preferences –> Control Panel Settings –> Internet Settings

image

Right Click in the right pane, and click new to explore available options

image

And as you see, Internet Explorer 9 is not listed (as you already expected)

Solution:

Microsoft have a hotfix for this situation, The hotfix will not add “Internet Explorer 9” to the Menu, But it will make “Internet Explorer 8” option applies also to IE9 (without this hotfix, the options will be filtered out, and will not be applied on iE9 users).

Download the hotfix from here, Install on the Windows 2008 R2 domain controller where you configure the group policies, and whenever you need to create a preference for IE9 choose “Internet Explorer 8” from the New menu, and you good to go.

Reference:

Note:

If you are applying Internet Explorer preference on Windows 7 machines, consider installing the below hotfix as well, The hotfix is descried and available for download here:

How To Know Microsoft iSCSI Initiator Version

I’ve been through a troubleshooting that I needed to know what is the version of iSCSI initiator is running on the server (we may come to the issue and the troubleshooting done in another post)

If you are in the same situation, you can use the steps below to identify the version of iSCSI initiator on your server:

 

STEP1: Find the Driver Version Number

– Open Device Manager, and expand the SCSI and RAID controllers node

image

– Right click on Microsoft iSCSI Initiator, and click Prosperities

– Go to the Driver tab, and take note of the Driver version number

image

 

STEP2: Map the Driver Version to the iSCSI Version

– lookup the version number in the below table to find the corresponding iSCSI Initiator release version:

 

Driver Version iSCSI Initiator Version
5.2.3790.198 version 1.0
5.2.3790.205 version 1.01
5.2.3790.215 version 1.02
5.2.3790.218 version 1.03
5.2.3790.243 version 1.04
5.2.3790.244 version 1.04a
5.2.3790.277 version 1.05
5.2.3790.279 version 1.05a
5.2.3790.302 version 1.06
5.2.3790.1653 version 2.0
5.2.3790.1748 version 2.01
5.2.3790.1895 version 2.02
5.2.3790.3099 version 2.03
5.2.3790.3273 version 2.04
5.2.3790.3392 version 2.05
5.2.3790.3497 version 2.06
5.2.3790.3640 version 2.07
5.2.3790.3825 version 2.08

This post is based on: http://netappfas.blogspot.com/2009/12/how-do-i-check-version-of-microsoft.html

Enable “Remote Desktop” for a Server Remotely

Sometimes, you or one of your team will forget to enable the remote desktop option for  a newly installed server/client , and sometimes this server/client will be on a remote location!

As per Mitch Tulloch from oreilly.com there’s a workaround. Sit down at your desk and log on to your Windows XP workstation using your administrator credentials and start Registry Editor by Start –> Run –> regedit –> OK. Then select the Connect Network Registry option under the File menu (Figure 2).

clip_image001

Click on Photo to Enlarge
Figure 2. Connecting to the Registry on a remote machine.

This opens the Select Computer search box. Either browse Active Directory to locate the remote server, or type its name in the textbox (Figure 3).

clip_image002

Click on Photo to Enlarge
Figure 3. Connecting to the Registry on a remote server named SRV220.

Click OK and a node will be displayed in Registry Editor for the remote machine (Figure 4).

clip_image003

Click on Photo to Enlarge
Figure 4. HKLM and HKU hives on SRV220.

Now browse HKLM on SRV to find the following Registry key (Figure 5).

HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

clip_image004

Click on Photo to Enlarge
Figure 5. Registry key for Terminal Server on remote machine.

Under the Terminal Server key, you’ll find a REG_DWORD value named fDenyTSConnection. Double-click on that value to open the Edit DWORD Value box and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled), as in Figure 6 below.

clip_image005

Click on Photo to Enlarge
Figure 6. Set fDenyTSConnections to 0 to enable Remote Desktop on SRV220.

The remote machine needs to be rebooted for the change to take effect, so open a command prompt and type the following command:

shutdown -m \\srv220 -r

After the remote machine reboots, Remote Desktop should be enabled on it.

Ref.: 1