Remove `curl` alias from powershell permanently

It’s Powershell, not Windows Powershell.

Check for existing powershell profile

Test-Path $PROFILE

If true, already exists, skip creation. Otherwise create it

New-Item -Path $PROFILE -ItemType File -Force

Open profile in notepad

notepad $profile

Add this line to the profile, save and close

Remove-Item Alias:curl -ErrorAction SilentlyContinue

Restart powershell

If the alias is not removed after restart

Ensure PowerShell is set to allow profile scripts by running

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser