Remove the new ad in PowerShell 5.1 on Windows 10

I really abhor the new ad in the PowerShell 5.1 console and it seems there's no hope of Microsoft making it go away.

After a long, involved Twitter conversation with the community and the PowerShell team that confirmed it's impossible for the advertisement (?!) to be easily removed, it looks like the only solution is to bypass it. Przemysław Kłys has a great suggestion to emulate the old prompt that totally works!

First, update the PowerShell shortcut in your taskbar (you have one right? 😁) to use -nologo.

Then add the following to your profile (notepad $profile)

1Clear-Host
2Write-Host "Windows PowerShell"
3Write-Host "Copyright (C) Microsoft Corporation. All rights reserved."
4Write-Host

The result ultimately looks like the original prompt. Hell yeah.

If you're wondering about my prompt, you can find it at dbatools.io/prompt.