Set cmd properties with PowerShell

PatrickJBurwell 1 Reputation point
2021-12-06T17:13:03.007+00:00

We want to set CMD options for Windows Server with our $PROFILE from POWERSHELL:
Green on black, blue on white
112x46
Buffers 50/999
Quick Edit, insert and Discard all checked
155267-image.png
155338-image.png
155268-image.png
But when we open "Command Prompt (Admin) nothing has changed:

Set-ItemProperty –path “HKCU:\Console” –name QuickEdit –value 1  
Set-ItemProperty –path “HKCU:\Console” –name InsertMode –value 1  
Set-ItemProperty –path “HKCU:\Console” –name HistoryNoDupe –value 1  
Set-ItemProperty –path “HKCU:\Console” –name HistoryBufferSize -value 50  
Set-ItemProperty –path “HKCU:\Console” –name ColorTable00 –value 0  
Set-ItemProperty –path “HKCU:\Console” –name ColorTable12 –value 255  
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,555 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SChalakov 10,391 Reputation points MVP
    2021-12-06T20:10:06.907+00:00

    Hi,

    can you please try taking the ownership of one of those registry key and then run the cmdlet again? What happens?
    Can you please also test with the "-Credential" parameter, which will allow you to enter your credentials. Something like:

    Set-ItemProperty –path “HKCU:\Console” –name QuickEdit –value 1 -Credential Get-Credential
    

    Can you please also take a look here and see if you find something helpful:

    Powershell set-itemproperty doesn't change registry setting
    https://stackoverflow.com/questions/21417562/powershell-set-itemproperty-doesnt-change-registry-setting

    I hope I could be of help!


    If my reply was helpful please don't forget to upvote and/or accept as answer, thank you!
    Regards,
    Stoyan

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.