Friday, July 22, 2011

Rebuilding User Profiles in Windows 7

Time comes when you need to rebuild user profile locally on the system.  Things are a bit different with Windows 7.  Renaming the user directory in c:\users is not sufficient, you need to delete one of the registry key associate with the image path.

Steps involved:

1. Rename the user profile under c:\users\
2.  Go to the following registry and delete the correct key base on ProfileImagePath.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList

Restart your system and whola!!!!

Enabling Folder Redirection Logging to gather verbose troubleshooting

http://support.microsoft.com/kb/907355

To enable Folder Redirection logging for troubleshooting purposes.  Create a registry key under:
(Please note this only applies to pre-Windows Vista machines)

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Diagnostics
New DWORD   |  FdeployDebugLevel
0000000F for verbose logging
00000000 for normal logging
The log files will be located at %windir%\debug\usermode\fdeploy.log

For Windows Vista and above, the logs will be in the application log or go straight into the Windows component, Folder Redirection log.

Thursday, July 21, 2011

Re-initialize offline file cache and database

There are times when the offiline file cache gets corrupted and you will need to rebuild or re-initialise the cache database.  Microsoft has published a KB Article regarding to this.

http://support.microsoft.com/kb/230738

Tuesday, July 19, 2011

Running Powershell Interactively

When you run a powershell script locally in a powershell box, you will get error message like "Script cannot be loaded because execution of script is disabled on the the system.."

This is in fact what it says, execution of script is prohibited.  This is the default settings:  To run script interactively on the box, execute this command:

"Set-ExecutionPolicy RemoteSigned"

You will be fine after that.

Tuesday, July 12, 2011

Viewing MSS: GPO settings in GPMC.

Ever wonder how you can view the MSS settings in the management console to look at those FDCC group policy settings from NIST?

1.  Download the Windows 7 Security Compliance Management Toolkit.  This tool replaces the previous version called GPO Accelerator

2.  Install the Windows 7 SCM Toolkit with elevated admin privillege. 

3.  Install the LocalGPO from Start Menu | All Programs | Microsoft Security Compliance Manager | Local GPO

4.  Once installed, go to Start Menu | All Programs | LocalGPO | LocalGPO command-line and Run as Administrator

5.  Execute this command "cscript LocalGPO.wsf /ConfigSCE"

6.  Wait for "Security Configuration Editor has been modified successfully" message.

Launch your GPMC and you should see the MSS settings. i.e. Computer Configuration | Windows Settings | Security Settings | Local Policies | Security Options