WMI error

If WMI don’t work do this to make it work again.

1. Disable and stop the WMI service.

sc config winmgmt start= disabled

net stop winmgmt

2. Run the following commands:

Winmgmt /salvagerepository %windir%\System32\wbem (if it fails run the next command and then this again)

Winmgmt /resetrepository %windir%\System32\wbem

3. Activate the WMI service and start it again

sc config winmgmt start= auto

net start winmgmt

Delete Logfiles on IIS

To delete log files the easy way you can create at schedule task that runs this:

To delete files:

c:\windows\system32\Forfiles.exe -p “C:\WINDOWS\system32\LogFiles\W3SVC1” -s -m *.log -d -14 -c “Cmd /C DEL @File”

Just to check that i works you can use this command in a CMD:

c:\windows\system32\Forfiles.exe -p “C:\WINDOWS\system32\LogFiles\W3SVC1” -s -m *.log -d -14 -c “Cmd /C ECHO @File”

Create new profile windows 2008 R2

Rename thise folders

c:\users\%username%

Log the user on and off again.

In regedit here : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
there is a entry that is called SID.bak

Delete this entry  and log the user on again

Move the personal files from the renamed folder to the new folder on C:\users

SQL update users

The following example shows how to use Auto_Fix to map an existing user to a login of the same name, or to create the SQL Server login Mary that has the password B3r12-3x$098f6 if the login Mary does not exist.

USE AdventureWorks2008R2;
GO
EXEC sp_change_users_login ‘Auto_Fix’, ‘Mary’, NULL, ‘B3r12-3x$098f6’;
GO

Examble:

USE Database;
GO
EXEC sp_change_users_login ‘Auto_Fix’, %User&, NULL, %password%;
GO

read more here : http://msdn.microsoft.com/en-us/library/ms174378.aspx

Outlook has blocked specified files

You have to remove Level 1 attachments remove i GPO

Microsoft Office Outlook 2007 ADM
Under Microsoft Office Outlook 2010/Security/Security Form Settings
Enable Outlook Security Mode
Under Microsoft Office Outlook 2010/Security/Security Form Settings/
Attachment Security
Enable Remove file extensions blocked as Lever 1 and add the file
extenssion i.e. XNK
Enable Remove file extensions blocked as Lever 2 and add the file
extenssion i.e. XNK

Can’t print from IE9

1. Change this setting i the GPO:

Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Temporary folders
Do not use temporary folders per session – has to be “enabled”

2. Create a login script for the user/GPO with this :

if exist “%temp%\low” goto :END
md “%temp%\low”
icacls “%temp%\low” /setintegritylevel L
:END

It creates the right folder that IE9 uses and sets the right settings on the folder

A program is trying to automatically send e-mail on your behalf.” in Outlook with security settings in Group Policy Issue

The Outlook Security Settings are not equivalent between Public Folders and Group Policy.

Specifically the following policies are only available in Public Folders and not in the Group Policy under Microsoft Office Outlook 2007/2010 | Security | Security Form Settings | Programmatic Security:

– When sending items via CDO
– When sending items via Simple MAPI
– When accessing the address book via CDO
– When resolving names via Simple MAPI
– When accessing address information via CDO
– When opening messages via Simple MAPI

 

Further more to enable this you have to enable this:

Microsoft Office Outlook 2007/2010 | Security | Security Form Settings | Outlook Security Mode

and choose : “Use Outlook Security Group Policy”