Powershell:$ profile指向我找不到的路径并设置了永久路径 [英] Powershell: $profile is pointing to a path that I can't find and setting permanent path

查看:602
本文介绍了Powershell:$ profile指向我找不到的路径并设置了永久路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看$ profile变量,发现它指向C:\ users \ username \ Documents \ windowsPowershell \ Microsoft.Powershell_profile.ps1

I am looking at my $profile variable and I see that it is pointing to C:\users\username\Documents\windowsPowershell\Microsoft.Powershell_profile.ps1

但是,当我尝试浏览到该目录时,找不到名为WindowsPowerShell的文件夹/目录,该文件夹/目录应该位于documents文件夹中.有什么想法吗?

However, when I attempt to browse to this directory I cannot find the folder/directory named WindowsPowerShell that is supposed to be in the documents folder. Any ideas?

我希望我可以设置一个永久路径,该路径链接到我的配置文件,或者至少在加载Powershell时加载了它.我在这里吗?

I was hoping I could set a permanent path that is linked to my profile or at least loaded with it when Powershell is loaded. Am I on the right track here?

谢谢!

-达斯汀

推荐答案

您看到的路径正确.这是用户配置文件(对于控制台主机)的路径,通常看不到文件夹和文件.您可以创建它并开始使用您的个人资料-new-item -type file -path $profile -force

What you see for the path is right. It is the path for your user profile (for the console host) and it is normal to not see the folder and the file. You can create it and start using your profile - new-item -type file -path $profile -force

有关更多信息,请参见此处: http://technet.microsoft.com/zh-CN/library/dd315342.aspx

See here for more: http://technet.microsoft.com/en-us/library/dd315342.aspx

这篇关于Powershell:$ profile指向我找不到的路径并设置了永久路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆