John Liu Blog

Every drop counts

Reallocate Windows Recovery Partition

After install Window, it will create a recovery partition following the system boot partition. If you want to reallocate the recovery partition, do the following. Disable existing Windows Recovery Partition use command line: reagentc /disable In command line window, run diskpart to remove the recovery partition: list disk select disk # (where # is the disk needing the recovery partition to be removed from. You can use Disk Management to confirm disk #) list partition select partition # (where # is the recovery partition) delete partition override (which will force delete the recovery partition) Now, expand your volume using Disk Management, and leave the similar size (~1024MB or as you see in the above list paritition) at the end of the drive for recreating the recovery partition.

Windows settings - GodMode

On your desktop, create a new folder and using the folliwng whole string, include dot and brackets, as the folder name. Now the folder icon will be change from folder icon so are chart type icon. If you double click the icon, it will open up the folder with almos all the windows settings you can access to. GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

PowerShell script to update hosts file

You may need to add computer entery into hosts file for easy RDP access. Run following PowerShell script in administrator mode to add the target machine/IP into hosts file. Or you can manually open the C:\Windows\System32\drivers\etc\hosts file and edit it. #Run this script in Administrator mode cls $Srv = Read-Host -Prompt "Target Server Name" $IP = Read-Host -Prompt "Target Server IP" $newEntry =$IP + " " + $Srv $hostfile = Get-Content C:\Windows\System32\drivers\etc\hosts [bool]$Update = 0 if (-NOT ($IP | Select-String -Pattern "[0-9]+\.

Wi-fi connection issue

When playing with Hyper-v, I somehow managed to break my local Wi-fi connection. The issue was that download speed is normal whereas upload speed is very slow (~0.6Mpbs) which caused web browser very slow and sometime error out. I initially thought might be firewall rules (I setup some new firewall rules). After using a physical cable connection, download/upload speed are as normal. Played with update/reinstall Wi-fi NIC driver with no luck.

Change NIC category

A network card (NIC) can be classified as in Private network, Public network or Domain network. One can setup different firewall policies for different network category. If need, you can use Powershell script to change NIC netowrk category. #to list NIC network connection profile info Get-NetConnectionProfile #to change NIC network connection profile Set-NetConnectionProfile -Name "Unidentified network" -InterfaceIndex 56 -NetworkCategory Private