Month: July 2013

Truncate Logfile in SQL Server

Using the code Step 1. Copy/type the below given SQL. Step 2. Change @DBName to < Database Name>, @DBName_log to <Log File Name> Step 3. Execute the SQL. ALTER DATABASE @DBName SET RECOVERY SIMPLE WITH NO_WAIT DBCC SHRINKFILE(@DBName_log, 1) ALTER DATABASE @DBName SET RECOVERY FULL WITH NO_WAIT GO In SQL Server data is stored using…




How to configure Windows Time Synchronization (w32tm.exe) on a Windows Server 2008 R2 PDC

This article explains how to configure your Windows Server 2008 R2 Active Directory Primary Domain Controller to syncronise time with an external time source. Note: In an active directory, all member computers will sync time with the PDC, so you only need to setup an external time source on the PDC. Open an elevated command…




How do I find orphaned computer objects in Active Directory using PowerShell?

How can I find all computer accounts in my Active Directory domain that have been inactive for x days using PowerShell? This would give you all computer accounts that have no activity for the last 365 Days. Search-ADAccount -AccountInactive -ComputersOnly -TimeSpan 365.00:00:00 This would sort it for you by lastlogondate. Search-ADAccount -AccountInactive -ComputersOnly -TimeSpan 365.00:00:00…