How to Cleanup WSUS

The WSUS Database used to install Microsoft Updates on Computers in your network may get quite large over time.

The program located at the following location can be used to create a scheduled task that will cleanup the database and the content files:

http://wsus.codeplex.com/releases/view/17612

Please note that on an Small Business Server 2011, WSUS is on port 8530, so when you run the WSUS_Cleanup_CL.exe command use:

C:
CD \SCRIPTS
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%a-%%b-%%c)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b)
echo Started at: %mydate% %mytime% >> WSUS_Cleanup_log.txt
WSUS_Cleanup_CL.exe <servername> f 8530 all
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%a-%%b-%%c)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b)
echo Ended at: %mydate% %mytime% >> WSUS_Cleanup_log.txt

You may need to manually run the following script initially before running WSUS_Cleanup_CL.exe to to prevent timeout errors from occurring. Take a look at this Microsoft article:

http://technet.microsoft.com/en-us/library/cc708594(WS.10).aspx

To run the script described on the Technet site using sqlcmd use the following:

sqlcmd -i <source directory>\WsusDBMaintenance.sql -o C:\Scripts\SUSDB_Log.log -I -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query 

I’ve pasted the code from the Microsoft site here, because using copy / paste from the Microsoft site causes the script to fail on single quotes.

/******************************************************************************
This sample T-SQL script performs basic maintenance tasks on SUSDB
1. Identifies indexes that are fragmented and defragments them. For certain
   tables, a fill-factor is set in order to improve insert performance.
   Based on MSDN sample at http://msdn2.microsoft.com/en-us/library/ms188917.aspx
   and tailored for SUSDB requirements
2. Updates potentially out-of-date table statistics.
******************************************************************************/

USE SUSDB;
GO
SET NOCOUNT ON;

-- Rebuild or reorganize indexes based on their fragmentation levels
DECLARE @work_to_do TABLE (
    objectid int
    , indexid int
    , pagedensity float
    , fragmentation float
    , numrows int
)

DECLARE @objectid int;
DECLARE @indexid int;
DECLARE @schemaname nvarchar(130);
DECLARE @objectname nvarchar(130);
DECLARE @indexname nvarchar(130);
DECLARE @numrows int
DECLARE @density float;
DECLARE @fragmentation float;
DECLARE @command nvarchar(4000);
DECLARE @fillfactorset bit
DECLARE @numpages int

-- Select indexes that need to be defragmented based on the following
-- * Page density is low
-- * External fragmentation is high in relation to index size
PRINT 'Estimating fragmentation: Begin. ' + convert(nvarchar, getdate(), 121)
INSERT @work_to_do
SELECT
    f.object_id
    , index_id
    , avg_page_space_used_in_percent
    , avg_fragmentation_in_percent
    , record_count
FROM
    sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, 'SAMPLED') AS f
WHERE
    (f.avg_page_space_used_in_percent < 85.0 and f.avg_page_space_used_in_percent/100.0 * page_count < page_count - 1)
    or (f.page_count > 50 and f.avg_fragmentation_in_percent > 15.0)
    or (f.page_count > 10 and f.avg_fragmentation_in_percent > 80.0)

PRINT 'Number of indexes to rebuild: ' + cast(@@ROWCOUNT as nvarchar(20))

PRINT 'Estimating fragmentation: End. ' + convert(nvarchar, getdate(), 121)

SELECT @numpages = sum(ps.used_page_count)
FROM
    @work_to_do AS fi
    INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id
    INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id

-- Declare the cursor for the list of indexes to be processed.
DECLARE curIndexes CURSOR FOR SELECT * FROM @work_to_do

-- Open the cursor.
OPEN curIndexes

-- Loop through the indexes
WHILE (1=1)
BEGIN
    FETCH NEXT FROM curIndexes
    INTO @objectid, @indexid, @density, @fragmentation, @numrows;
    IF @@FETCH_STATUS < 0 BREAK;

    SELECT
        @objectname = QUOTENAME(o.name)
        , @schemaname = QUOTENAME(s.name)
    FROM
        sys.objects AS o
        INNER JOIN sys.schemas as s ON s.schema_id = o.schema_id
    WHERE
        o.object_id = @objectid;

    SELECT
        @indexname = QUOTENAME(name)
        , @fillfactorset = CASE fill_factor WHEN 0 THEN 0 ELSE 1 END
    FROM
        sys.indexes
    WHERE
        object_id = @objectid AND index_id = @indexid;

    IF ((@density BETWEEN 75.0 AND 85.0) AND @fillfactorset = 1) OR (@fragmentation < 30.0)
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REORGANIZE';
    ELSE IF @numrows >= 5000 AND @fillfactorset = 0
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD WITH (FILLFACTOR = 90)';
    ELSE
        SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD';
    PRINT convert(nvarchar, getdate(), 121) + N' Executing: ' + @command;
    EXEC (@command);
    PRINT convert(nvarchar, getdate(), 121) + N' Done.';
END

-- Close and deallocate the cursor.
CLOSE curIndexes;
DEALLOCATE curIndexes;

IF EXISTS (SELECT * FROM @work_to_do)
BEGIN
    PRINT 'Estimated number of pages in fragmented indexes: ' + cast(@numpages as nvarchar(20))
    SELECT @numpages = @numpages - sum(ps.used_page_count)
    FROM
        @work_to_do AS fi
        INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id
        INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id

    PRINT 'Estimated number of pages freed: ' + cast(@numpages as nvarchar(20))
END
GO

--Update all statistics
PRINT 'Updating all statistics.' + convert(nvarchar, getdate(), 121)
EXEC sp_updatestats
PRINT 'Done updating statistics.' + convert(nvarchar, getdate(), 121)
GO

Posted in Computer-Repair | 1 Comment

How to Backup SharePoint Databases SBS 2008

Introduction

In this post we describe how to backup the SharePoint databases on Windows Small Business Server 2008. You will find that not backing up those database will in the long run cause the SQL transaction log to get very large and also cause the SQLServer service to consume lot’s of memory.

In addition since we don’t use SharePoint we changed the Recovery Model from Full to Simple for all of the databases. The difference being that Recovery Model Full requires that the transaction logs be DUMP’ed and then performing a Full backup of the database to clear the transaction logs. In addition with a Full Recovery model you would normally setup a series of scheduled task to perform a DUMP TRANSACTION and at the end of the day perform the Full database backup. This may be beneficial in an environment that is using SharePoint to store content/files.

Some of the issues that we found that were caused by this are:

  • Windows Imaging Backups takes up to 17 hours to complete a backup of 180GB, after the cleanup, it completed in 1.5 hours.
  • A Server with 8 GB of memory was paging excessively because it was out of memory. We found sqlserver consuming up to 1.7GB of memory. This occurred on an SBS 2008 Server.

    Change Recovery Model

    To change the recovery model you will need to start SQL Server Management Studio.

  • Make sure you are logged in as Administrator
  • Connect to the SHAREPOINT database, by selecting \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
  • Right click on each database and select Properties
  • Click on Options
  • Change Recovery Model to Simple
  • Restart SHAREPOINT database instance

    Scripts to Backup the Databases

    We developed two scripts to backup the SharePoint Databases, the SUSDB and the SBSMonitoring database. We scheduled the scripts to run once a week.

    Before running the scripts do the following:

  • Create a folder to store the backups, in this example D:\SharePoint Backups
  • Create a folder for the Scripts, in this example: C:\Scripts

    Backup SharePoint

    Two files need to be created, an MSDOS Batch file to run the SQL Command and .sql file that contains the SQL commands to execute.

    NOTE: You will need to use SQL Server Management Studio to obtain the GUID for your SharePoint_AdminContent database.

    WARNING: You may need to re-enter the apostrophe’s when you copy and paste the following files if the log file displays errors.

    Create the Backup_SharePoint.CMD DOS Batch file with the following command:


    sqlcmd -i C:\Scripts\Backup_SharePoint.sql -o C:\Scripts\Backup_SharePoint.log -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
    

    Create the Backup_SharePoint.sql file for SharePoint

  • -- Backup SharePoint_AdminContent
    USE [SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab]
    GO
    
    BACKUP DATABASE [SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab] TO  DISK = 'D:\SharePoint Backups\Sharepoint_AdminContent' WITH NOFORMAT, INIT,  NAME = 'SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10 
    
    -- Truncate SharePoint_AdminContent Transaction log
    DBCC SHRINKFILE ([SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab_log], 10)
    PRINT ''
    PRINT ''
    
    -- Backup SharePoint_Config
    USE [SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6]
    
    GO
    BACKUP DATABASE [SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6] TO  DISK = 'D:\SharePoint Backups\Sharepoint_Config' WITH NOFORMAT, INIT,  NAME = 'SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate Transaction for SharePoint_Config
    DBCC SHRINKFILE ([SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6_log], 10)
    PRINT ''
    PRINT ''
    
    -- Backup ShareWebDb
    USE [ShareWebDb]
    GO
    BACKUP DATABASE [ShareWebDb] TO  DISK = 'D:\SharePoint Backups\ShareWebDb' WITH NOFORMAT, INIT,  NAME = 'ShareWebDb-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate Transaction log for ShareWebDb
    DBCC SHRINKFILE ([ShareWebDb_log], 10)
    PRINT ''
    PRINT ''
    
    -- Backup SUSDB
    USE [SUSDB]
    GO
    BACKUP DATABASE [SUSDB] TO  DISK = 'D:\SharePoint Backups\SUSDB' WITH NOFORMAT, INIT,  NAME = 'SUSDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate Transaction log for SUSDB
    DBCC SHRINKFILE ([SUSDB_log], 10)
    PRINT ''
    PRINT ''
    
    -- Backup WSS_Search
    USE [WSS_Search_<Server Name>]
    GO
    BACKUP DATABASE [WSS_Search_<Server Name>] TO  DISK = 'D:\SharePoint Backups\WSS_Search_<Server Name>' WITH NOFORMAT, INIT,  NAME = 'WSS_Search_<Server Name>-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate log WSS_Search
    DBCC SHRINKFILE ([WSS_Search_<Server Name>_log], 10)
    PRINT ''
    PRINT ''
    
    -- Backup WSS_Search_WIN-EUGSO7LO7PY
    USE [WSS_Search_WIN-EUGSO7LO7PY]
    GO
    BACKUP DATABASE [WSS_Search_WIN-EUGSO7LO7PY] TO  DISK = 'D:\SharePoint Backups\WSS_Search_WIN-EUGSO7LO7PY' WITH NOFORMAT, INIT,  NAME = 'WSS_Search_WIN-EUGSO7LO7PY-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate log WSS_Search_WIN-EUGSO7LO7PY
    DBCC SHRINKFILE ([WSS_Search_WIN-EUGSO7LO7PY_log], 10)
    PRINT ''
    PRINT ''

    Create the Backup_SBSMonitoring.CMD DOS Batch file


    sqlcmd -S <Server Name>\SBSMONITORING -i C:\Scripts\Backup_SBSMonitoring.sql -o C:\Scripts\Backup_SBSMonitoring.log

    Create the Backup_SBSMonitoring.sql file for the SBSMonitoring Database


    USE SBSMONITORING
    GO
    -- Run CleanupDatabase Stored Procedure to remove records that are past 30 days
    
    UPDATE [SBSMonitoring].[dbo].[Settings] SET [Value] = 30 WHERE [Name] = 'CleanupPeriod'
    
    EXECUTE [SBSMonitoring].[dbo].[CleanupDatabase]
    
    -- Backup and shrink database and transaction log
    BACKUP DATABASE [SBSMonitoring] TO  DISK = N'D:\SharePoint Backups\SBSMonitoring' WITH NOFORMAT, INIT,  NAME = N'SBSMonitoring-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    DBCC SHRINKFILE (SBSMonitoring_log , 10)
    DBCC SHRINKFILE (SBSMonitoring, 100)

    Schedule the Task


    Once the above files have been created simply use Task Scheduler to run the .cmd files. We scheduler them to run once a week. Also when you create the Tasks, select Run whether user is logged on or not

    Conclusion

    Not maintaining these database will cause serious performance issues for your server.

    Posted in Computer-Repair | Leave a comment

    How to Backup SharePoint Databases SBS 2011

    Introduction

    In this post we describe how to backup the SharePoint databases on Windows Small Business Server 2011. You will find that not backing up those database will in the long run cause the SQL transaction log to get very large and also cause the SQL Server service to consume lot’s of memory.

    In addition since we don’t use SharePoint we changed the Recovery Model from Full to Simple for all of the databases. The difference being that Recovery Model Full requires that the transaction logs be DUMP’ed and then performing a Full backup of the database to clear the transaction logs. In addition with a Full Recovery model you would normally setup a series of scheduled task to perform a DUMP TRANSACTION and at the end of the day perform the Full database backup. This may be beneficial in an environment that is using SharePoint to store content/files.

    Some of the issues that we found that were caused by this are:

    1. Windows Imaging Backups takes up to 17 hours to complete a backup of 180GB, after the cleanup, it completed in 1.5 hours.
    2. A Server with 8 GB of memory was paging excessively because it was out of memory. We found SQL Server consuming up to 1.7GB of memory. This occurred on an SBS 2008 Server.

    Change Recovery Model

    To change the recovery model you will need to start SQL Server Management Studio.

    1. Make sure you are logged in as Administrator
    2. Start SQL Management Studio
    3. Connect to the SHAREPOINT database
    4. Right click on each database and select Properties
    5. Click on Options
    6. Change Recovery Model to Simple
    7. Restart SHAREPOINT database instance

    Scripts to Backup the Databases

    We developed three scripts to backup the SharePoint Databases, the SUSDB and the SBSMonitoring database. We scheduled the scripts to run once a week.

    Before running the scripts do the following:

    1. Create a folder to store the backups, in this example D:\SharePoint Backups
    2. Create a folder for the Scripts, in this example: C:\Scripts

    Backup SharePoint

    Two files need to be created, an MSDOS Batch file to run the SQL Command and .sql file that contains the SQL commands to execute.

    NOTE: You will need to use SQL Server Management Studio to obtain the GUID for your SharePoint_AdminContent database.

    Create the Backup_SharePoint.CMD DOS Batch file with the following command:


    sqlcmd -i C:\Scripts\Backup_SharePoint.sql -o C:\Scripts\Backup_SharePoint.log –S <server name>\SHAREPOINT

    Create the Backup_SharePoint.sql file for Sharepoint


    -- Backup SharePoint_AdminContent
    USE [SharePoint_AdminContent_SharePoint_AdminContent_00c52a8a-d823-48ef-8838-b214190af291>]
    GO
    
    BACKUP DATABASE [SharePoint_AdminContent_SharePoint_AdminContent_00c52a8a-d823-48ef-8838-b214190af291] TO  DISK = 'D:\SharePoint Backups\SharePoint_AdminContent' WITH NOFORMAT, INIT,  NAME = 'SharePoint_AdminContent-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10 
    
    -- Truncate/Shrink SharePoint Admin_Content Transaction Log
    DBCC SHRINKFILE ([SharePoint_AdminContent_SharePoint_AdminContent_00c52a8a-d823-48ef-8838-b214190af291_log] , 10)
    PRINT ''
    PRINT ''
    
    -- Backup SharePoint_ConfigurationDatabase
    USE [SharePoint_ConfigurationDatabase]
    BACKUP DATABASE [SharePoint_ConfigurationDatabase] TO  DISK = 'D:\SharePoint Backups\SharePoint_ConfigurationDatabase' WITH NOFORMAT, INIT,  NAME = N'SharePoint_ConfigurationDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate SharePoint_ConfigurationDatabase Transaction Log
    DBCC SHRINKFILE ([SharePoint_ConfigurationDatabase_log] , 10)
    PRINT ''
    PRINT ''
    
    -- Backup ShareWebDb
    USE [ShareWebDb]
    BACKUP DATABASE [ShareWebDb] TO  DISK = 'D:\SharePoint Backups\ShareWebDb' WITH NOFORMAT, INIT,  NAME = 'ShareWebDb-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    -- Truncate ShareWebDb Transaction Log
    DBCC SHRINKFILE ([ShareWebDb_log] , 10)
    PRINT ''
    PRINT ''
    USE [WSS_Search_<Server Name>]
    
    -- Backup WSS_Search Database
    BACKUP DATABASE [WSS_Search_<Server Name>] TO  DISK = 'D:\SharePoint Backups\WSS_Search_<Server Name>' WITH NOFORMAT, INIT,  NAME = 'WSS_Search_<Server Name>-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    DBCC SHRINKFILE ([WSS_Search_<Server Name>_log] , 10)
     

    Backup SUSDB

    Two files need to be created, an MSDOS Batch file to run the SQL Command and .sql file that contains the SQL commands to execute.

    Create the Backup_SUSDB.CMD DOS Batch file with the following command:


    sqlcmd -i C:\Scripts\Backup_SUSDB.sql -o C:\Scripts\Backup_SUSDB.log -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

    Create the Backup_SUSDB.sql file for SUSDB


    USE SUSDB
    BACKUP DATABASE [SUSDB] TO  DISK = 'D:\SharePoint Backups\SUSDB' WITH NOFORMAT, INIT,  NAME = 'SUSDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    DBCC SHRINKFILE (SUSDB_log , 10)
    DBCC SHRINKFILE (SUSDB)

    NOTE: Take a look at this article on how to cleanup the SUSDB database:
    http://ct-miramar.com/blog/2012/04/15/how-to-cleanup-wsus/

    Backup SBSMonitoring Database

    Two files need to be created, an MSDOS Batch file to run the SQL Command and .sql file that contains the SQL commands to execute.

    Create the Backup_SBSMonitoring.CMD DOS Batch file with the following command:


    sqlcmd -S <Server Name>\SBSMONITORING -i C:\Scripts\Backup_SBSMONITORING.sql -o C:\Scripts\Backup_SBSMONITORING.log

    Create the Backup_SBSMonitoring.sql file for the SBSMonitoring DB


    USE SBSMONITORING
    GO
    -- Run CleanupDatabase Stored Procedure to remove records that are past 30 days
    
    UPDATE [SBSMonitoring].[dbo].[Settings] SET [Value] = 30 WHERE [Name] = 'CleanupPeriod'
    
    EXECUTE [SBSMonitoring].[dbo].[CleanupDatabase]
    
    -- Backup and shrink database and transaction log
    BACKUP DATABASE [SBSMonitoring] TO  DISK = N'D:\SharePoint Backups\SBSMonitoring' WITH NOFORMAT, INIT,  NAME = N'SBSMonitoring-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    
    DBCC SHRINKFILE (SBSMonitoring_log , 10)
    DBCC SHRINKFILE (SBSMonitoring, 100)
    

    Schedule the Tasks

    Once the above files have been created simply use Task Scheduler to run the .cmd files. We scheduler them to run once a week. Also when you create the Tasks, select Run whether user is logged on or not

    Conclusion

    Not maintaining these database will cause serious performance issues for your server.

    Posted in Computer-Repair | Leave a comment

    Run Windows Imaging Backup from Command Prompt

    To run the Windows Imaging Backup from a DOS command prompt use the following command:

    @echo off
    c:
    cd \scripts

    REM – Put date and time in a log file to record start time
    For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set mydate=%%a-%%b-%%c)
    For /f “tokens=1-2 delims=/:” %%a in (‘time /t’) do (set mytime=%%a:%%b)
    echo Started at: %mydate% %mytime% >> log.txt

    REM – Run Windows Imaging Backup
    wbadmin start backup “-backupTarget:\\<server name>\<share name>\<Folder name>” -quiet -noverify -vssFull -include:c:,d: –allCritical

    REM – Put end time in log file
    For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set mydate=%%a-%%b-%%c)
    For /f “tokens=1-2 delims=/:” %%a in (‘time /t’) do (set mytime=%%a:%%b)
    echo Ended at: %mydate% %mytime% >> log.txt

    Additional notes
    ______________________________________________________________
    Run wbadmin /? to display options
    Run wbadmin start backup /? to display options for this command
    Run wbadmin GET STATUS to display status of backup job.

    Errors are posted in the Application log and also take a look at
    Applications and Services Logs\Microsoft\Windows\Backup\Operational for events related to backup

    Posted in Computer-Repair | Leave a comment

    Schrink SUDB SBS 2007

    Althought this post is not complete, here is a list of commands that may help with schrinking the size of the SUDB database:

    You must use SQL Enterprise Manager to run these commands. If you don’t have it, you can download it from Microsoft, just google search for SQL Enterprise Manager download

    – Must switch DB to simple mode
    USE SUSDB
    GO

    – Displace LOG Space being used
    DBCC SQLPERF(LOGSPACE)
    –BACKUP LOG WITH TRUNCATE_ONLY

    – Truncate the Transaction log
    DBCC SHRINKFILE (SUSDB_log, 10, TRUNCATEONLY)

    – Display amount of space being used inside the SUSDB Database
    sp_spaceused

    – Reduce the size of SUSDB Database
    DBCC SHRINKFILE (SUSDB)

    – RUN FULL BACKUP ON DATABASE

    Posted in Computer-Repair | Leave a comment

    Get Exchange 2007 Service Pack Level

    1. Go to the Exchange Management Console
    2. Select Server Configuration
    3. Right click on the Exchange server and check the version number.

    You can find all of the build version numbers for all Exchange versions here:
    http://support.microsoft.com/kb/158530

    Here is a list for Exchange 2007 and 2010
    
    Microsoft Exchange Server  2007      8.0.685.24 or 8.0.685.25
    Microsoft Exchange Server  2007 SP1  8.1.0240.006
    Microsoft Exchange Server  2007 SP2  8.2.0176.002
    Microsoft Exchange Server  2007 SP3  8.3.0083.006
    Microsoft Exchange Server  2010      14.00.0639.021
    Microsoft Exchange Server  2010 SP1  14.01.0218.015
    
    Posted in Computer-Repair | Leave a comment

    Get Current Data & Time DOS Batch File

    To write the current date and time and write to a DOS batch file use the following command:

    @echo off
    For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set mydate=%%a-%%b-%%c)
    For /f “tokens=1-2 delims=/:” %%a in (‘time /t’) do (set mytime=%%a:%%b)
    echo Started at: %mydate% %mytime% >> log.txt

    The above command will write the current date and time to log.txt. The >> sign causes dos to append/create to the log file.

    Posted in Computer-Repair | Leave a comment

    How to use Microsoft Live Writer with WordPress

    Microsoft Live Writer is an application that allows you to create blog post from your computer.

    The first thing you need to do is download Windows Live Essential from here:
    http://explore.live.com/windows-live-essentials

    Install Windows Live Writer

    Windows Live Essential contains several applications such as MSN an Email client and several others, if you are only interested in Live Writer than select Custom to only install Live Writer.

    Configure WordPress

    In order for Live Writer to be able to access your blog on WordPress you need to enable the following setting after logging into your WordPress Admin Control Panel.

    1. Click on Settings
    2. Click on Writing
    3. Place a checkmark next to XML-RPC

      image

    Configure Live Writer

    1. Once the above is done, start Windows Live Writer
    2. Select WordPress
    3. Enter the URL for the page that your users go to, to view your blogs
    4. Enter your username and password.

    And that’s all there is to it. Happy blogging.

    Posted in Computer-Repair | Leave a comment

    How to use Exchange 2010 logs to determine blocked emails

    You may sometimes run into an issue where your users are complaining that emails are not being delivered. To help troubleshoot this issue take a look at the Exchange AntiSpam Agent logs.

    By default the AntiSpam Agent log is enabled in Exchange 2010 and can be found here:
    C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs

    For a list of error messages take a look at this Microsoft article Understanding Anti-Spam Stamps: http://technet.microsoft.com/en-us/library/aa996878.aspx

    Reference: http://www.urtech.ca/2010/08/how-to-troubleshoot-exchange-2007-2010-antispam-failures/

    Posted in Computer-Repair | Leave a comment

    Connect USB Drive vmware 5.0

    It is now finally possible to connect a USB drive to a vmware host and have it appear on your vmware guest. Very easy to do, just follow these instructions from vmware:

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022290

    Posted in Computer-Repair | Leave a comment