Thursday, 26 May 2011

List all users and email addresses in Exchange

Use this tool (VBS script) to generate the list:


http://exchangepedia.com/2005/09/how-to-export-all-email-addresses-from-a-domain.html


To get a list of users that have forwarding configured perform this Custom AD search


(&(mailNickname=*)(altRecipient=*))

Friday, 20 May 2011

Extact MSI files

Go here:
http://thebackroomtech.com/2007/08/23/howto-extract-files-from-a-msi-file-using-the-windows-command-line/

SQL Server: Database marked as suspect

If SQL Server thinks there is something wrong with a database - it will mark it as suspect to prevent any further damage, and refuse to mount it.

There are a couple of things we can to get things up and running again.

1. Instruct the server to mount the DB. This is done using the Query Analyser and feeding instructions to the server.
2. Check the database for corruption.
3. Put the system into production once we are sure the DB is 100%.

Refer to this for step 1: http://www.sqlservercentral.com/articles/Administration/unmarksuspect/137/

The reset command is:

sp_resetstatus @dbname = "db_name")

* replace db_name with the database name.

For the DBCC checks: http://msdn.microsoft.com/en-us/library/aa258278%28v=sql.80%29.aspx

The check command is:

DBCC CHECKDB('db_name')

* replace db_name with the database name.

Friday, 13 May 2011

Replace System Files - Windows 7

Windows 7 has very strict permissions on who can modify or delete files in the System32 and other critical folders. Do the following on particular files you need to replace to allow access:

Take ownership and grant permissions on the file

cd C:\Windows\System32\
TAKEOWN /F spoolsv.exe
ICACLS spoolsv.exe /grant administrators:F

You can now rename and replace the files as required.