Monday, July 25, 2011

Windows update Error 0x8007f004

Last week I had the need to bring in a Win 2003 server into my Win 2008 domain to support a legacy application that refuses to run on Win 2008 R2 server.
After building the server and adding it to the domain while applying the windows updates I got "Unable to apply the updates - Failed and Error 0x8007f004"
The primary reason for this is because administrators need to have permissions on the following policies
Local Policies > User Rights Assignment
1. Back up files and directories
2. Debug programs
3. Restore files and directories
4. Manage auditing and security log
5. Take ownership of files or other objects
In my case I updated permissions on group policy at domain level "Manage auditing and security log" for an issue I was having with SharePoint and mistakenly removed Administrator group and added "Domain admin" group.
Added back the Administrator group and the updates ran fine.

Sunday, July 24, 2011

How to delete a user profile in Vista, Windows 7 and Windows 2008?

Apart from going to the Users folder and deleting the profile one must also go to the registry as shown below and delete the key corresponding to that user. In my case I needed to know a SID of a user after the user was disabled and deleted from AD. Looking at the profileImagePath one can cross check the user associated with the SID.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1659004503-1788223648-1417001333-500]
ProfileImagePath”=”%SystemDrive%\Documents and Settings\User1”
“Sid”=hex:01,05,00,00,00,00,00,05,15,00,00,00,57,66,e2,62,a0,20,96,6a,75,b9,75,54,f4,01,00,00
“Flags”=dword:00000000
“State”=dword:00000100
“CentralProfile”=”"

Friday, July 22, 2011

Windows 7 random RDP disconnects.

The windows 7 client when RDP'ing into windows 2008 servers are randomly getting disconnected if the user min the RDP window even for like 20 seconds. It will try to reaquire the RDP session once the RDP screen is maximized. After a little bit of research below are the steps I took to remedy this issue.

Disable autotunning. Open an cmd windows with admin rights and issue the below command
netsh interface tcp set global autotuninglevel=disabled
You can check to see if this is disabled or not by running
netsh interface tcp show global
If you want to enable it back run the below command
netsh interface tcp set global autotuninglevel=normal

Change the MTU size from default value 1500 to 1300 following below steps
netsh interface ipv4 show interface
netsh interface ipv4 set subinterface "Local Area Connection" mtu=1300 store=persistent

There might be multiple other reasons as well you can try rolling back the NIC drivers, disabling the "Power Management" feature, depending on the network backbone try diff speed settings from AUTO to 100/Half, 100/Full. Looking at couple of other settings as well. Will first try them on the test servers and will post the results.