I don't mind a bit of Microsoft marketing, but this is annoying when I just want a clean PowerShell prompt. Has anyone found a way of suppressing just the Try the new cross-platform PowerShell https://aka.ms/pscore6
on opening PowerShell, without removing the basic copyright message Windows PowerShell, Copyright (C) Microsoft Corporation. All rights reserved.
? I've googled around a lot but found no answer (I know there is a way to suppress everything, but I just want rid of that pscore6 advert only).
6 Answers
Since Windows Terminal 1.0 is released, you can use it instead.
In settings add a flag -NoLogo
as shown below:
"list": [
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe -NoLogo",
"hidden": false
},
-
3This removes also the text "Windows PowerShell, Copyright (C) Microsoft Corporation. All rights reserved."– EmreCommented May 29, 2020 at 11:52
-
2if you don't mind getting rid of the copyright the whole command is
Powershell.exe -NoLogo
(for users who don't know how to add a flag)– AlbinCommented Aug 21, 2020 at 10:23 -
1For anyone else having trouble finding the settings in the first place, you have to click the small downwards arrow to the right of the "new tab" button.– AMTKCommented Feb 2, 2021 at 1:17
-
2Down arrow as AMTK said, select shell of choice under Profiles in left menu. From there you can add edit the info either by editing within the fields input fields in the main windows (Command Line in this case) or by clicking the "Open JSON file" option at the bottom of the left menu (that is the view from original answer.– DaileyoCommented Apr 23, 2021 at 16:18
-
1Since 1.7 Windows Terminal has UI for settings which makes it easier to edit. Before that, it was only through editing a JSON file.– user4931157Commented Apr 23, 2021 at 18:21
You can get rid of the copyright banner by starting powershell from running this in cmd:
Powershell.exe -NoLogo -NoExit
-NoExit
is not necessary as @Albin said, and you could create a desktop shortcut/batch file from it.
-
2thanks for the post! Added
-NoLogo -NoExit
to my PS shortcut on the Taskbar, and it worked like magic! 1. Pin PS to taskbar 2. Right-click the icon, right-clickWindows Powershell
, clickProperties
3. Add-NoLogo -NoExit
at the end ofTarget
– rtqateCommented Feb 2, 2020 at 4:47 -
2Important to note:
-NoExit
isn't necessary and-NoLogo
gets rid of the copyright message as well (the OP what to keep the copyright message intact)– AlbinCommented Aug 21, 2020 at 10:20 -
This also worked for me in VS Code, by adding
"args": ["-NoLogo"]
to the powershell entry in settings.json Commented Aug 29, 2021 at 2:36
This message is part of the resource string embedded in Microsoft.PowerShell.ConsoleHost
in the ManagedEntranceStrings.resources
resource. The full message is
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
This is one string, not two, and there is no logic for picking a different banner.
Because the string is read as a resource, in theory you could create a new resource assembly and put it in C:\Windows\System32\WindowsPowerShell\v1.0\en-US
. In practice you can't (even if you'd be willing to put new files in a system directory), because the main assembly is strong-named and installed in the GAC, which means you can't produce a satellite assembly that will load since you don't have the private key required for signing. It does, however, work -- I verified this by building such an assembly with delayed signing, but obviously that's not really a workable idea on a production system.
-
2Fascinating. Thanks for that Jeroen. So Microsoft have decided to quite deeply embed this advert. Shame. And when PS 7 goes full release, they will make an update change this to advertise PS 7. Can I live with it? Sure, but I'm not really a big fan of blatant advertising ... shame there is no easy way to purge this pointless Microsoft advertising. Thanks!– YorSubsCommented Jan 10, 2020 at 15:41
-
PS 6 isn't halfway done yet; when it is, I suspect this ad will either get removed, changed to just
pscore
, or thepscore6
link will actually forward to PS 7, because MS has essentially stopped major development on the "classic" PowerShells for the moment (pre-Core) and they'd like us all to migrate. It doesn't really make sense to sink effort into updating classic PS just for this string (unless it comes along with a security patch or something). Commented Jan 10, 2020 at 16:35 -
Indeed, yes, PS 5.1 is end of life of course, and PS 7 is ultimately the future (hopefully they build it out to give us all the features of 5.1 as soon as possible). I don't object to the direction that MS is taking things (in fact, it's pretty exciting in many ways). That pscore6 advert will be a bit redundant when PS Core 7 is out, but yeah, they can't leave it saying pscore6 when pscore7 is out for a year or more, that'll look a bit silly, but I guess they've got some kind of path, mothball 5.1 when 7 can cover everything maybe but that would be kind of drastic...– YorSubsCommented Jan 10, 2020 at 22:21
Replace command line argument in settings.json with this:
"commandline": "powershell.exe -NoLogo -NoExit -Command Write-Host Windows PowerShell`nCopyright `(C`) Microsoft Corporation. All rights reserved.`n",
It disables original text, and writes what we need instead.
If you want to write something else, use `n
for new lines, and don't forget to add `
for escaping reserved symbols, like parentheses.
Different language example:
"commandline": "powershell.exe -NoLogo -NoExit -Command Write-Host Windows PowerShell`n`(C`) Корпорация Майкрософт `(Microsoft Corporation`). Все права защищены.`n",
-
This approach is perfect for Windows Terminal. Although it's not generic at the moment, hopefully Windows Terminal will become the default PowerShell terminal when Windows 11 is released.– YorSubsCommented Sep 14, 2021 at 14:50
-
-
1@ChrisCrossCrash That's honestly a bit of "old" information. While you can still change it through
settings.json
, Microsoft has now added the ability to change most settings directly through the UI. Just make the change to the "Command Line" setting for the PowerShell profile. If you do want to seesettings.json
, it can be opened through a link at the bottom-left of the Settings screen - "Open JSON file". Commented Oct 14, 2021 at 22:41
Suppressing messages in IntelliJ IDEA (i.e. WebStorm).
Had the same messages in the terminal windows of my WebStorm.
You can suppress these messages by adding the -NoLogo
flag to the Shell Path for the Terminal Emulator.
- Go to the settings for configuring the Terminal Emulator by clicking:
File menu -> Settings -> Tools -> Terminal.
- Click to confirm editing these settings if needed and then change the Shell path accordingly to:
powershell.exe -NoLogo
When you next time start your IntelliJ IDEA the terminal windows will be clean.
-
1
This message means "you are using the old version of powershell". You must update it with commands and software. When I updated powershell, this message never came again.
-
1Unfortunately, even on the latest version of PowerShell, you get junk. When I install 7, I also get
https://aka.ms/powershell Type 'help' to get help.
Would be nice if Microsoft gave us the option to get rid of the junk. It's hard to take it seriously when they are pushing their ads at us that we don't need to see :-(– YorSubsCommented Apr 21, 2020 at 17:17 -
Powershell 5.1 is the still corporate standard. It comes with Windows Server and it's the basis of a lot of in-house scripts. The later versions have just a few nice but not that compelling features. That would be weighed against the costs and risks of upgrading all Windows servers and checking code. If it ain't broke...– JimB2Commented Jan 3, 2023 at 23:09
cls
orClear-Host
to remove everything. Then I get a clean shell with onlyPS C:\Users\user>
. Seems like too much effort to remove the advert when I can just clear the window.cls
orClear-Host
in your $PROFILE, but that could be annoying as well if you start it up from a CMD prompt and still want to see what was displayed. The flash is a bit annoying even when starting up a Powershell prompt directly.pscore7
so hopefully there is some way to tweak this unless they've embedded it inside the powershell.exe or something like that. :-(