showing all posts
by lunarg on September 23rd 2015, at 14:16
Since 2008, when a (local or domain) admin logs on a Windows Server, Server Manager is automatically started. This is often unwanted and tedious, especially with later versions, which take time to load and cannot be closed until they're done loading.

You can disable automatic startup of Server Manager through a group policy. Apply this to all your servers will prevent Server Manager from starting up, even on new servers and users logging on a server for the first time.

Create (or open an existing) group policy which gets applied to your servers.

In the policy, navigate to: Computer Configuration → Policies → Administrative Templates → System → Server Manager

Set Do no  ...
by lunarg on September 23rd 2015, at 11:17

When pinning Notepad2 to the taskbar in Windows 10, a duplicate icon is created. Unpinning the duplicate also removes the original icon, leaving you always with two icons on the taskbar.

To resolve, look for and remove the following line (located in the section [Settings2]) from the settings file %APPDATA\Notepad2.ini:


Save the file, then unpin and re-pin Notepad2 to the taskbar.

by lunarg on September 21st 2015, at 12:40

This one-liner will output a list of installed programs, similar to what you get when looking it up through Control Panel → Add/Remove Programs.

Get-WmiObject -Class Win32_Product | Select-Object -Property Name

The advantage of this cmdlet is that you can dump it to a text file:

Get-WmiObject -Class Win32_Product | Select-Object -Property Name > Software.txt

And through PS remoting, you can also run this on remote systems.

by lunarg on September 21st 2015, at 12:31

You can easily perform 'diff' style text comparisons with Powershell:

Compare-Object -ReferenceObject (Get-Content file1.txt) -DifferenceObject (Get-Content file2.txt)
by lunarg on September 17th 2015, at 16:40
Sometimes, it may be handy to know how many CALs in Exchange are now actually in use. In Exchange 2010 and 2013, this can be done very easily.

There are two types of Exchange CALs: Standard and Enterprise. For the majority, the CALs provide the same feature, accept for Enterprise, which has the following additional features:

Mailbox archiving

Per-mailbox journaling

Unified Messaging

If a mailbox uses any of these "enterprise" features, then it is treated as an Enterprise CAL. If not, it is a Standard CAL.

License compliancy
This process "calculates" the current required CALs, not the CALs you have purchased. It's up to you to determine whether you are compliant.

In  ...
by lunarg on September 16th 2015, at 17:24
After demoting a domain controller, the related event logs (DNS Server, File Replication Service, and Directory Service) are not removed. While this is technically not an issue, it can potentially confuse monitoring systems (SCOM inadvertently detects a DNS server while there is none). Or, perhaps you should want to be tidy.

Open regedit.

Navigate to:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog

This key contains a subkey, one for each event log. Remove the following keys to remove the event logs:Directory Service

File Replication Service

DNS Server

You do not need to reboot the server. The logs are immediately removed from the Event Viewer.

Although the change is effe  ...
by lunarg on September 16th 2015, at 10:16
If you want to do agentless monitoring of a Windows 2003 host, you need to configure WMI to allow remote querying.

Open Computer Management (Administrative Tools). Expand Services and Applications. Right-click WMI Control, then click Properties.

Select the Security tab, click the Root namespace, then click the Security button at the bottom.

Add the user that will need access to WMI. This is usually the service account running the System Center agent on the host that will monitor this host.When adding the account, be sure to allow for Remote Enable.

If Windows Firewall is in use, you also have to allow for remote management:

Open a command prompt.

Type the following to allow remote mana  ...
by lunarg on September 15th 2015, at 15:56
Rather than installing the Exchange 2013 management tools, you could also connect to the Exchange Management Shell (EMS) through Powershell "remoting".

Connect to EMS using the current credentials (i.e. the user running Powershell):

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchange-server-fqdn/PowerShell -Authentication KerberosImport-PSSession $session

Replace exchange-server-fqdn with the FQDN or IP address of the Exchange server you wish to connect to. With this command, you will be using the credentials of the current logged in user, and authenticate through Kerberos. If the user is not a organizational admin, you will be able to l  ...
by lunarg on September 11th 2015, at 11:31

Here are the download links for the old Java SE 6, 7 and 8 installers. You can download both the JRE and JDK from these pages.

(*) For Java SE 6 and 7, you'll need to create a free Oracle account to download.

by lunarg on September 11th 2015, at 10:39
This is a very crude script to defrag (using eseutil) Exchange mailbox databases.

The script takes the database name as a mandatory parameter. It then dismounts the database, checks whether the database state has been shutdown cleanly, performs the defrag, verifies the state again, and finally, mounts it again.

Note that this is an offline process. The specified mailbox database will be offline, meaning that all mailboxes in the database will not be accessible until the process has been completed.

Use with caution!
This script has not been tested extensively and does not account for everything that can go wrong. I merely provide it as a good starting point to extend the script to somethin  ...
by lunarg on September 11th 2015, at 10:32

You can redirect the output of a Powershell script to a file. This is called transcribing, and is very useful if you have some Powershell scripts as scheduled tasks and wish to log its output.

Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -Path "C:\transcript.log" -Append
# My script code goes here...
by lunarg on September 11th 2015, at 10:15

There are two methods to specifically target 32-bit or 64-bit OS'es in group policies.

WMI filter

  • For x64 (64-bit):
    • Namespace: root\CIMv2
    • Query: SELECT * FROM Win32_Processor WHERE AddressWidth = '64'
  • For x86 (32-bit):
    • Namespace: root\CIMv2
    • Query: SELECT * FROM Win32_Processor WHERE AddressWidth = '32'

Environment variable

Another method is to check the value of the %Processor_Architecture% variable:

  • For x64 (64-bit): %Processor_Architecture% is AMD64
  • For x86 (32-bit): %Processor_Architecture% is x86
by lunarg on September 10th 2015, at 14:04
By default, Adobe Acrobat Reader DC is set to automatically download and install updates, and the ability to disable or configure automatic updates has been removed. But you can still configure/disable this through the registry in the following key:

Windows x86 (32-bit): HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe ARM\Legacy\product name\product version

Windows x64 (64-bit): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Adobe ARM\Legacy\product name\product version

Replace product name and product version accordingly. For example: Reader\{AC76BA86-7AD7-1043-7B44-AC0F074E4100}

Under the key, set the Mode DWORD value to one of the following:

0: Do not download or install updates automaticall  ...
by lunarg on September 10th 2015, at 13:10
Installation of certain Windows updates may fail to complete. Although the installation itself succeeds, the configuration part does not complete, and the changes are reverted, causing all updates to fail. When looking at the update history (Windows Update → View update history), the updates have failed with error code 0x800F0922:

The following updates are known to be affected by this, but there are probably others as well.

Windows 8/Server 2012: KB2756872, KB2770917, KB2955163

Windows 8.1/Server 2012 R2: KB2919355

The affected updates fail to install because the System Reserved partition (not the C:-drive) is full or nearly full.

In my case, a log file in the System Volume Infor  ...
by lunarg on September 10th 2015, at 11:30
If you are running a non-en-US Windows 10, and wish to install Remote Server Administration Tools for Windows 10, you may notice the install does not succeed.

The installation of RSAT finishes after about 5-10 seconds, claiming it has been installed successfully. However, the RSAT tools are nowhere to be found, and update history does not show KB2693643 to be installed.

Attempting to install RSAT through Dism.exe fails with error : 0x800f081e

Dism.exe /Online /Add-Package /PackagePath:WindowsTH-KB2693643-x64.cabDeployment Image Servicing and Management toolVersion: 10.0.10240.16384Image Version: 10.0.10240.16384Processing 1 of 1 - Adding package Microsoft-Windows-RemoteServerAdministrati  ...
by lunarg on September 9th 2015, at 11:43
RSAT for...Fully supported server OSDownload
Windows 102012 R2 and belowDownload
Windows 8.1 2012 R2 and belowDownload
Windows 8 2012 and below Download
Windows 7 SP12008 R2Download

A newer RSAT version is always backwards compatible with older server OS versions. For example, all Windows versions from 2012 R2 and below are fully supported by RSAT for Windows 10.

Older RSAT versions can manage newer server OS versions, but only features that are also present in older OS versions can be managed properly. For example, RSAT for Windows 7 partially supports 2012 R2: features that are present on 2008 R2 can be managed, but features unique to 2012 or 2012 R2 cannot).

by lunarg on September 9th 2015, at 10:50

The Handpresso, a handheld espresso machine, for use on the road.

This should be standard issue in every corporate car...

If you want it, you can purchase it here

by lunarg on September 8th 2015, at 11:20
When installing a lot of Windows updates, or a few very large updates (such as a service pack or KB2919355), the updates may fail and the system may revert the changes. If that happens, check the Windows Update history (Windows Update → View update history), and view the details of the failed updates.

If the error code is 0x800F0922, verify whether there's still enough free disk space available on the system drive (C:-drive). If the volume is almost full, there may be enough to download updates, but not enough to actually install them. Aside of the downloaded packages, the unpacking and installation of updates, additional space is needed for system restore points and the old versions  ...
by lunarg on September 8th 2015, at 09:44
If Windows Update mysteriously fails to install updates, it may become necessary to completely clear the Windows Update cache. This resets the state of updates, removes downloaded files and requires Windows Update to completely re-analyze your system to figure out what updates are required.

The procedure is non-invasive and can be performed on workstations and servers alike and without downtime.

Open an elevated command prompt.

Stop the Windows Update service: net stop wuauserv

Remove the SoftwareDistribution folder, containing the complete cache and downloads: From the command prompt: cd /d %windir%rd /s SoftwareDistribution

Or, remove the folder through Windows Explorer.

Start the   ...
by lunarg on September 4th 2015, at 13:57

The Microsoft File Checksum Integrity Verifier (fciv.exe) is a command line tool you can use to calculate MD5 and SHA1 hashes for files.

It is a suitable alternative to linux's md5sum, and eliminates the need for third party tools or Cygwin.

showing all posts
« March 2021»
« When a bird does poo poo in your eye, be happy elephants don't fly. »