r/PowerShell • • Sep 25 '22

Editing registry with powershell

Hi. I have a registry file I have created to change the default font of my windows 10.

I wonder if i can do this with powershell

this is my text I want in powershell.

even one line will be enough for me... I don't know how to write it.

thanx

Windows Registry Editor Version 5.00

[HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts]

"Segoe UI (TrueType)"=""

"Segoe UI (TrueType)"=""

"Segoe UI Black (TrueType)"=""

"Segoe UI Black Italic (TrueType)"=""

"Segoe UI Bold (TrueType)"=""

"Segoe UI Bold Italic (TrueType)"=""

"Segoe UI Historic (TrueType)"=""

"Segoe UI Italic (TrueType)"=""

"Segoe UI Light (TrueType)"=""

"Segoe UI Light Italic (TrueType)"=""

"Segoe UI Semibold (TrueType)"=""

"Segoe UI Semibold Italic (TrueType)"=""

"Segoe UI Semilight (TrueType)"=""

"Segoe UI Semilight Italic (TrueType)"=""

[HKLM:\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]

"Segoe UI"="Tahoma"

2 Upvotes

9 comments sorted by

View all comments

0

u/[deleted] Sep 25 '22

[deleted]

2

u/jimb2 Sep 26 '22

This is worth looking, even if you don't end up using it, at because it creates safe code.

The danger: create a key that already exists and it is it is emptied (ie destroyed and recreated.) A nasty trap for young players.