Association between virtual ethernet and virtual switch

You’ve just created couple of internal network switches in your Hyper-V Manager. Or you’ve just installed Docker for Windows and played with it a little. Now want to create NAT to allow your fresh new containers and/or virtual machines to have access to the Internet. Unfortunately there is no simple way to say which of the HNS Internal NIC adapters associated with proper vSwitch.

Read More

Windows storage hierarchy explained

Quick cheat sheet:

  1. Physical disk, represented by Win32_DiskDrive and MSFT_Disk WMI classes. This is hardware presented to your computer. It is HDD, SSD, FC LUN or iSCSI LUN.
  2. Partition, represented by Win32_DiskPartition and MSFT_Partition WMI classes. Partitions are walls that transforming your physical space into rooms, which later can be used to store your data. Physical disk can have 0 or more partitions.
  3. Volume, represented by Win32_Volume and MSFT_Volume WMI classes. Volumes are named spaces, from abstract rooms you get living room, kitchen and bedrooms. You format room to make it “named room”. Or in other words, you format partition to some file system, i.e. NTFS, FAT or ReFS. Volumes can store data and provide access to it. One partition can have 0 or 1 volume. When partition has 0 volume, in most cases this means that there is no data accessible by user.

Read More

“The update is not applicable to your computer”

Recently I’ve needed to apply 2 patches to our Windows 2008 R2. But both patches show me error “The update is not applicable to your computer”. But I knew for sure, that these updates were applicable, because installed file’s version was lower than the one contained in hotfixes. In Setup log I’ve got “Windows update could not be installed because of error 2149842967” error. The problem was that someone disabled Windows Modules Installer service on this machine, which is TrustedInstaller.

Read More

Limit group policy only to client OS

Sometimes you want to apply your policy to every client PC in many OUs. To do such you can use WMI filter. This is especially useful in messy AD structures, where is no dedicated OU for client computer objects.

Namespace: root\CIMv2
Query: select * from Win32_OperatingSystem where ProductType="1"

Read More

Can’t access any Outlook tabs on ribbon except Enterprise Vault

Recently one of our customers installed Microsoft Dynamics CRM Outlook add-in and discovered that after this action Microsoft Outlook became absolutely useless, because after start of the program there are no other tabs except Enterprise Vault, which is also used by this customer. Little research showed that the root of the problem is in some components of earlier version of Microsoft Office. To fix problem you need to delete following registry key:


Read More

Random data big file creation

Sometimes you just need a big file. For example to test network speed, of backup speed. And to prevent software of hardware compression you need this file to be absolutely random. Also you do not want to write this file byte by byte, as it can be really slow. Here is my version of powershell script to generate such file:

Read More

TMG 2010 and “RPC Server unavailable”

Recently I have encountered strange TMG behavior. I have permitted all RPC connections to Domain Controllers with system rule and disabled RPC Filter plus switched off “Enable strict RPC compliance” option. But my WMI requests and any other RPC traffic from TMG servers to internal resources was still blocked.

Read More

Backing up DAG cluster with TSM

There is a problem with DAG cluster backup in TSM. When you create script with /PREFERDAGPASSIVE key, your script return error 464 – nothing to backup. So I’ve created script to analyze Exchange’s databases if there is healthy passive copy of database to backup, so you run backup for the only healthy copy of database and for passive healthy copies of database. If there is nothing to backup than script returns 0.

Read More

Connecting with android Boxer mail app to hotmail account over ActiveSync

By default if you try to connect to any Hotmail e-mail with Boxer app (current version 2.0.0), which is a default in CyanogenOS 12s, it set up your account with IMAP and SMTP. Such setup prevents you from using your calendar and contacts. To fix this you should set up your connection with ActiveSync, but such option is not available by default. To set up it correctly you need to do following steps.

Read More

TSM ANS0106E error on backup or dsmc run

Recently we’ve found that one of our TSM servers stopped to back up all virtual machines. After examination of dsmerror.log files we’ve found strange messages:

03/20/2015 09:48:42 ANS0106E Message index not found for message 2252.
03/20/2015 09:49:01 ANS0106E Message index not found for message 14320.
03/20/2015 09:49:01 ANS0106E Message index not found for message 14180.

And so on.

Read More

Wmic exception occured

Some time ago we have faced problem that our script which calls wmic to get some values stopped to work. After a short research we have found that on some servers wmic utility stopped to work, showing exception every time we run any command:

wmic os get caption
Description = Exception occurred.

Read More

Find all VMWare VMs created in a given period

To find all virtual machines created in a given period use the following SQL script:

select ev.CREATE_TIME, EV.VM_NAME AS OldName  
Where (EV.event_type = 'vim.event.VmDeployedEvent' OR EV.EVENT_TYPE = 'vim.event.VmCreatedEvent' OR EV.EVENT_TYPE = 'vim.event.VMClonedEvent') AND EV.CREATE_TIME >= cast('1.01.2013' AS DATETIME) AND EV.CREATE_TIME <= cast('31.01.2014' AS DATETIME)

Read More

Listing all MSSQL performed for specific database

Yesterday I’ve stuck with restoring some MSSQL database, because of incompatibility between used differential and full backups, after I’ve found correct full backup, restore process completed without any problem. The following error identifies that:

The log or differential backup cannot be restored because no files are ready to rollforward

Read More

Enable Text Console (SOL) on Windows Server 2012

After installing Windows 2012 on old Fujitsu Primergy RX200 we lost ability to manage it with serial console. We’ve even tried to update iRMC firmware with no luck. Problem was resolved after we enabled EMS (Emergency Management Services) with the following set of commands:

BCDedit /bootems {Boot_entry_id} ON

bcdedit /ems on

bcdedit /emssettings EMSPORT:2 EMSBAUDRATE:115200

Read More