r/PowerShell • u/Sea_Propellorr • 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"
4
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
1
0
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.
0
16
u/taniceburg Sep 25 '22