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

16

u/taniceburg Sep 25 '22
Set-ItemProperty ‘HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts’ -Name “Segoe UI (TrueType)” -Value “”

-2

u/Sea_Propellorr Sep 25 '22

Thanx.

I'll get along with the rest of it.

Thanx

4

u/yutsokutwo Sep 25 '22

You know Google for these things works better than posting and waiting for comments, pretty much every cmdlet 8s documented...

4

u/[deleted] Sep 25 '22

Regedit.exe /s Key.reg

-2

u/Sea_Propellorr Sep 25 '22

I would like to edit the registry with powershell only.

Without ant reg file.

2

u/BighornPorpoise Sep 25 '22

Bbiam, font substituting comic sans for my entire org real fast lol

1

u/Django_gvl Sep 25 '22

Roger Zander has a website that converts reg to PS. Perhaps that will help

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.