Serverless Framework sls Conflicts with Powershell sls (Select-string)
PowerShell seems to have a Select-String command / cmdlet aliased to sls. The PowerShell alias layer seems to take precedence over the node.js serverless sls command.
One way to remove the PowerShell sls alias is to run the following in PowerShell
Remove-Item alias:sls
This change only applies to the current PowerShell session.
To permanently replace the PowerShell sls alias, you can modify the Microsoft.PowerShell_profile.ps1 file.
From PowerShell, open your profile page in Notepad with the following command:
notepad $profile
Add the following to the file and save.
Remove-Item alias:sls
The profile can be reloaded by running the following from Powershell
. $profile
In my file, you will see that I have removed the curl and sls aliases.
Now I can see what I expect when logging into sls in PowerShell.
How can I remove the default remote Powershell alias?
--- Update ----
An easier option is to use the "serverless" command instead of "sls".
source to share