未加载指定的模块“updateScript”,因为在任何模块目录中找不到有效的模块文件

时间:2016-08-12 09:23:30

标签: powershell

每当我在Window的10台机器上启动PowerShell时,我都会收到以下错误。

import-module : The specified module 'updateScript' was not loaded because no valid module file was found in any
module directory.
At C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1:48 char:1
+ import-module updateScript
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (updateScript:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

get-newScript : The term 'get-newScript' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1:49 char:1
+ get-newScript -scriptPath $scripts
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (get-newScript:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

这是我第一次尝试在该计算机上使用PowerShell。其他类似配置的机器没有错误。

1 个答案:

答案 0 :(得分:0)

您的个人资料中似乎有一些内容。只需运行ii $profile。应该打开一个文本文件,您可能需要删除这些命令......