Skip to main content

Posts

Can’t install Hyper-V Management Tools on Windows Server 2019 if the machine/VM does not support virtualization

Can’t install Hyper-V Management Tools on Windows Server 2019 if the machine/VM does not support virtualization   I tried to install PowerShell Direct to manage docker containers but can't install the feature, trying to run: PS C:\> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell  yields with error below: PS C:\Users\Administrator> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled. At line:1 char:1 + Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException     + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand Apparently this happens when the OS is running on a ma

Creating new Windows admnistrator user from the command line

Creating new Windows admnistrator user from the command line I am not quite comfortable with too few options available when creating a new user in Windows 10 Home edition, so I do the following. c:\> net user timus P@$$w0rd123!@# /add /Passwordchg:No c:\> WMIC USERACCOUNT WHERE "Name='timus'" SET PasswordExpires=FALSE c:\> net localgroup administrators timus /add

Logging in to remote ssh server using private/public key pair

Logging in to remote ssh server using private/public key pair I have recently used VS Code for remote development and I am experiencing multiple disconnections a day. Like disconnecting form the docking station, moving around the house or just plain network issues. Using password to reconnect is becoming an annoyance. To help improve the workflow I have enabled private/public key pair, like: PS C:\> ssh-keygen -t rsa -b 2048 PS C:\> cat ~/.ssh/id_rsa.pub | ssh user@remote_ip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" This was tested on Windows 10 v1909.

Changing the color of the title bar via registry

This will change the title bar to black c:\> reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "AutoColorization" /t REG_SZ /d "0" /f c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM" /v "ColorPrevalence" /t REG_DWORD /d "1" /f c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM" /v "AccentColor" /t REG_DWORD /d 4282203453 /f c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM" /v "AccentColorInactive" /t REG_DWORD /d "13882323" /f

Event Viewer XML Filtering by Source

There are situations where you wanted to exclude certain sources (event providers) when analyzing Windows Event Logs. For example, in figure 1 below, say you wanted to exclude events from Lib_SLP and still see the rest, how would you do that?     Figure 1. Source is Lib_SLP   First, head over to Details tab, XML View . Observe the XML structure - we are interested to the System | Provider elements.  Figure 2. XML VIew   To filter out that provider, click on Filter Current Log.. and type the following: Figure 3. XML Filter View < QueryList >    < Query Id = "0" Path = "Application" >      < Select Path = "Application" >         *[System[Provider[@Name!="Lib_SLP"]]]      </ Select >    </ Query > </ QueryList > REF: T:001