среда, 14 октября 2026 г.

Add Network Shares to Windows 10 library

 Original:  https://albarich.wordpress.com/2018/10/11/add-network-shares-to-windows-10-library/

 

The Scenario

I have a Windows library on my domain-joined Windows 10 client created for Sales related folders – the library is called Sales. Currently I have added a few local directories on my C drive to it, but now I want to add a network share \\fileserver1\sales

The Problem

Natively you cannot add network shares to Libraries, ONLY local directories.

The Solution

You use the MKLINK command to create a symbolic link to an empty local folder that is already added to the Library

  1. Create a local, empty folder with the name you want to view in the library pane, like Sales. i.e. C:\Sales
  2. Add this local folder to your Sales library
  3. Delete C:\Sales – You’ll notice the link is not removed from the library itself
  4. Open an elevated command prompt and create a symbolic link between the network share and the now-deleted local C:\Sales directory: mklink /D C:\Sales \\fileserver1\sales
  5. Return to the Library pane and expand the Sales library, all the content from \\fileserver1\sales will now be visible.


воскресенье, 11 октября 2026 г.

Diagnose and change Remote Desctop Service via CLI

Check listener:

  • netstat -ano | findstr ":{RDP port}"

Check service:

  • sc query TermService
  • sc qc TermService

Check registry:

  • reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
  • reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber
  • reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v fEnableWinStation

Change port:

  • reg export "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" C:\rdp-tcp-backup.reg /y
  •  reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t R
    EG_DWORD /d {new RDP port} /f

Check from other computer (PowerShell):

  •  Test-NetConnection YOUR_PUBLIC_IP -Port {new RDP port}

вторник, 25 августа 2026 г.

How to force Windows reboot from remote CLI

Sometimes you meet a situation when remote Windows is completely frozen, so you can't even start RDP session. But if you can open console session via SSH, it's possible to reboot the computer remotely.

Try use the following commands:

  • powershell -Command "Get-WmiObject Win32_Process -Filter \"name='winlogon.exe'\" | ForEach-Object { $_.Terminate() }"
  • powershell -Command "Get-CimInstance Win32_Process -Filter \"name='winlogon.exe'\" | Invoke-CimMethod -MethodName Terminate"
  • powershell -Command "(Get-WmiObject Win32_Process -Filter \"name='wininit.exe'\").Terminate()"
     

вторник, 7 июля 2026 г.

Clean up Windows Non-essential Files

 

How to clean up the WinSxS folder safely:
  1. Use Disk Cleanup:
    • Press the Windows Key and type Disk Cleanup.
    • Select your C: drive and click OK.
    • Click on the Clean up system files button.
    • Check the boxes for Windows Update Cleanup and other files you want to remove, then click OK. [1, 2, 3]
  2. Use the DISM Tool (More Advanced):
    • Press the Windows Key, type cmd.
    • Right-click Command Prompt and select Run as administrator.
    • Type the following command and press Enter:
      dism.exe /online /Cleanup-Image /StartComponentCleanup
      [1, 2, 3]
This removes old, unnecessary versions of files and safely reduces the folder's size.

понедельник, 8 декабря 2025 г.

Disable https redirect in Firefox

To disable http → https redirects, go to about:config page and set to false the following parameters:

browser.fixup.fallback-to-https = false

network.stricttransportsecurity.preloadlist = false

dom.security.https_first = false

Also check Settings → Privacy & Security → HTTPS-Only Mode is disabled.

See: https://www.reddit.com/r/firefox/comments/1g8lekv/disable_https_redirect/ 

вторник, 16 июля 2024 г.