Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Last active June 26, 2024 19:40
Show Gist options
  • Save Postrediori/70c3db1c9488fd00fa18b4e76c90caed to your computer and use it in GitHub Desktop.
Save Postrediori/70c3db1c9488fd00fa18b4e76c90caed to your computer and use it in GitHub Desktop.
Windows HowTos

Windows HowTos

Force "Details" folder view to show standard columns in folders with music files

  • Go in to the folder's Properties
  • Select the Customize tab
  • Under the section What kind of folder do you want? change the Optimize this folder for: option from Music to General Items.

Source: https://superuser.com/a/1478697/1860262

Enable incoming ping

  • Open Windows Defender Firewall with Advanced Security by running WF.msc
  • In Inbound rules folder navigate to File and Printer Sharing (Echo Request ICMP...-In)

To filter IP addresses that are allowed to ping the machine

  • Open Properties of the rule
  • On the Scopes tab under Remote IP addresses list click Add and specify the IP address

Source: https://theitbros.com/allow-ping-icmp-echo-requests-on-windows-firewall/

Redirect IP in Windows

Identify loopback Idx (first column):

netsh int ip sh int

Add redirect rule:

netsh int ip add addr <IDX> <IP>/32 st=ac sk=tr

Verify that it works by running a sniffer or from command line

tracert -d <IP>

Remove the rule:

netsh int ip delete addr <IDX> <IP>

Source: https://serverfault.com/a/712997/480471

Lock account and sleep when closing the laptop lid (Windows 11)

Lock account

Navigate to Settings -> Accounts -> Sign-in options.

Under Additional settings set the parameter If you're been away, when should Windows require you to sign in again? to Every time.

Set Lid Close Action to Sleep

Open the Local Group Policy Editor gpedit.msc

Navigate to Computer Configuration -> Administrative Templates -> System -> Power Management -> Button Settings

Edit the following policies in Button Settings:

  • Select the lid switch action (plugged in)
  • Select the lid switch action (on battery)

Double click on the policy name, set it to Enabled and Lid Close Action parameter to Sleep.

Link: https://www.elevenforum.com/t/change-lid-close-action-in-windows-11.3356/#Six

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment