2
在PowerShell中更改到主目录
在cmd命令提示符下,此命令会将我带到主目录: cd %UserProfile% 在PowerShell命令提示符处,同一命令会产生此错误: Set-Location : Cannot find path 'C:\%UserProfile%' because it does not exist. At line:1 char:3 + cd <<<< %UserProfile% + CategoryInfo : ObjectNotFound: (C:\%UserProfile%:String) [Set-Location], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand PowerShell中的等效命令是什么?