YorSubs
YorSubs

Reputation: 4080

Suppress "Try the new cross-platform PowerShell https://aka.ms/pscore6"

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).

Upvotes: 54

Views: 61889

Answers (6)

Wilt
Wilt

Reputation: 44413

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.

  1. Go to the settings for configuring the Terminal Emulator by clicking:
    File menu -> Settings -> Tools -> Terminal.
  2. 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.

Upvotes: 4

megapro17
megapro17

Reputation: 425

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",

powershell

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",

Upvotes: 7

wasif
wasif

Reputation: 15498

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.

Upvotes: 22

user4931157
user4931157

Reputation:

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
  },

Upvotes: 42

mahdi
mahdi

Reputation: 9

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.

Upvotes: -10

Jeroen Mostert
Jeroen Mostert

Reputation: 28809

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.

Upvotes: 16

Related Questions