0
Man PowerShell
does not recognize the Set-Location
, this has been happening for a while now every time I run a code in VS Code because my work and projects are in the cloud and on another HD but I never gave any importance because it ran normal.
But now I can’t open any terminal in the folder itself or browse by switching Hds
Error:
Set-Location : O termo 'Set-Location' não é reconhecido como nome de cmdlet, função, arquivo de script ou programa
operável. Verifique a grafia do nome ou, se um caminho tiver sido incluído, veja se o caminho está correto e tente
novamente.
No linha:1 caractere:1
+ Set-Location -Path 'G:\OneDrive\Gui\GuiTestes\Python\Projetos ...
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-Location:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(This is the same error that appears in the VS Code terminal)
.
I checked in the PowerShell ISE
the "installed" controls and the Set-Location
does not actually appear (and also another command set-variable
, I found out going into the ISE
):
Ever tried to use
Import-Module -Name Microsoft.PowerShell.Management
before theSet-Location
?– Augusto Vasques
OK.. This worked, but I’ll need to do it manually when I need to use Set-Location or any other command. Not some way to fix it?
– Gui Reis
Are you using Windows 10? If you’re not checking the Powershell version, I had a similar problem trying to run a script on a Windows 7 and had to install the newer version of Powershell
– Leandro Godoy Rosa
Could have used
pushd
andpopd
who perform the same function.– Bruno Warmling
I didn’t know these commands. But from what I could tell, it wasn’t just the
Set-Location
that was with this error, other commands are with this problem. But obr– Gui Reis