Skip to content

Instantly share code, notes, and snippets.

@ajhalili2006
Forked from lfalck/RemoveCurlAlias.ps1
Last active September 27, 2021 05:51
Show Gist options
  • Save ajhalili2006/b71624434758858fbce4fedf3e04dc79 to your computer and use it in GitHub Desktop.
Save ajhalili2006/b71624434758858fbce4fedf3e04dc79 to your computer and use it in GitHub Desktop.
Remove the PowerShell alias curl/wget -> Invoke-WebRequest
# Originally forked from https://gist.github.com/lfalck/fbb04ef438b521064e0c5742bcd28c2f, I just added
# another Remove-Item for wget, because I'm not a fan of Invoke-WebRequest
$removeCurlAlias = @"
# Remove Alias curl -> Invoke-WebRequest
Remove-Item alias:curl
Remove-Item alias:wget
"@
if (-Not (Test-Path $Profile))
{
New-Item –Path $Profile –Type File -Value "$removeCurlAlias`r`n"
}
else
{
Add-Content –Path $Profile -Value "`r`n$removeCurlAlias"
}
@Hosampor1
Copy link

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment