Jan 05

WinRM would not listen on port 5985

The WinRM was configured to allow remote administration via a GPO but it wouldn’t let us connect with Enter-PSSession. The firewall rule was there passing the traffic on TCP port 5985.

Checking WinRM config showed something strange:

Listener [Source=”GPO”]
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = null

So WinRM was actually configured but wasn’t listening on any network interface. Why?

Continue reading

Jan 03

What is Add-PrinterDriver actually used for?

As of Windows 8.1 / Server 2012 R2 there is one beautiful cmdlet -Add-PrinterDriver. It dramatically simplifies driver/printer installation.

Naturally you will be tempted to install a driver from an .inf file like this:

But you will be blamed:

So it does not work as you/we may think. Sigh… So then what it is used for?

Continue reading

Dec 30

Running Linux on Windows 10

INTRODUCTION

Often developers and related OPs need to test stuff on Linux (web, cli, .NET Core etc.). The typical approach was to spin up a Virtual machine (VM), install and configure a Linux distro and play with it.

Main Cons include: you need a hyper-visor software, enough RAM, fast hard drive, to fight with basic operations like cope-paste text and files between machines etc.

Well, good news! As of the Anniversary Update Windows 10 supports the so called “Windows Subsystem for Linux” (WSL). It allows you to run natively* most of the non GUI Linux stuff**on Windows without the overhead of a virtual machine.

Continue reading

Dec 29

How to enable Night Light feature on DisplayLink devices in Windows 10

Windows 10 Creators Update comes with a cool new feature called “Night Light“. It allows you to warmer the colors of your monitors during dark hours (or in a dark room) so your eyes feel more comfortable (programmers will appreciate it much!). It supportsf.lux‘s basic functionallity, but now it is a built in Windows 10 feature. Great!

Continue reading

Dec 21

Matching Windows disk to VM disk in VMWare

UPDATE 2018-02-12: The script below has some issues. I found better version here:https://communities.vmware.com/thread/548671

Those who have experience in VMWare know that there is no 1 to 1 match between VM’s disk number and the disk inside guest OS.

You can use this script to export disk mappings to grid or to a csv file:https://github.com/PKGeorgiev/PowerShell-VMWare/blob/master/Get-VmDiskToWindowsDiskMapping.ps1

This script is a slight modification of Conrad’s version with some improvements:

  1. Allow pipelining
  2. Use Guest’s hostname in all WMI calls instead of VM’s name (they can differ)
  3. Formatting and error checking

Continue reading

Dec 20

Chrome: how to check witch tab consumes most CPU & Memory

Suddenly my Chrome started to consume unusual amount of CPU:

Since I’d opened zillions of tab I wasn’t sure which web page was the suspect. In these cases you can take advantage of Chrome’s built-in task manager.

Continue reading

Dec 20

NTFRS: How to force SYSVOL replication

For those who still use NTFRS – as of KB823230 ntrfsutl can be used to force Sysvol replication:

The replication path will be SRC_DC_FQDN > DST_DC_NAME

In fact ntfrsutl connects to DST_DC_NAME and “tells” NTFRS to pull Sysvol changes from its inbound partner SRC_DC_FQDN.