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 for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. SChalakov 10,666 Reputation points MVP Volunteer Moderator
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.