Category: Microsoft

Entity Framework – Show generated SQL

How to view the SQL Generated by Entity Framework Entity Framework follows the following three steps. Translate C# code into SQL statements Execute SQL on a target database Return values back to C# objects. Now the question is how the generated SQL statements look like and how we can view the SQL executed on the…



Get .NET Framework Version of an assembly (dll/exe) using PowerShell

i just had to find the required framework version for a compiled .NET assembly (just to make sure, that the selected Application Pool in IIS was set to the righte Framework Version). ——– $fileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ Filter = ‘Assemblies (*.dll & *.exe)|*.dll’ MultiSelect = $true} [void]$fileBrowser.ShowDialog() $files = $fileBrowser.FileNames   foreach($file in $files)…



Debugging Group Policy Processing

Group Policy Debug Log Settings The below article has got information about enabling different debug loggings which are required for troubleshooting various Windows issues. UserEnv Debug Logging Userenv logging is useful when troubleshooting group Policy application related issues or User profile related issues….




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…




Media added to DLNA shared library does not show up in Samsung Allshare Play

I’m streaming a lot of my media directly to my Samsung TV (Allshare). lately I added music to my Music Library in Microsoft Windows 8. The Library is shared using DLNA Protocol. For some reason, the newly added media did not show up am my Samsung TV. I started playing around with the configuration of…




Send text messages directly from any e-mail program (Outlook, Thunderbird..)

eSMS by Dolphin Systems allows you to send and receive text messages from any e-mail program. You must have a Swisscom mobile phone number for using eSMS. Ready for immediate use Before you can use eSMS, you have to register via text message; follow the relevant user manual for this. You can then use eSMS…




PowerShell – Get installed/enabled Windows Features

Sometime you need to ‘clone’ the Windows feature-set of a specific server. That’s a task I’m currently working on. Using PowerShell to enumerate/list all enabled Windows Features is easy……




Remote Server Administration Tools for Windows 8 Release Preview

Remote Server Administration Tools for Windows 8 Release Preview enables IT administrators to manage roles and features that are installed on computers that are running Windows Server 2012 from a remote computer that is running Windows 8 Release Preview. Overview Remote Server Administration Tools for Windows 8 Release Preview includes Server Manager, Microsoft Management Console…