导入powershell模块失败

时间:2014-04-03 08:32:31

标签: powershell import module

有人可以解释我错过了什么。我试图导入NTFSSecurity powershell模块。文件夹在" C:\ Windows \ system32 \ WindowsPowerShell \ v1.0 \ Modules \"中提取,也改变了执行策略。仍然有错误。 System 2008R2 PS v.:2.0

PS C:\Users\admin> $env:PSModulePath
C:\Users\admin\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

PS C:\Users\admin> get-module -ListAvailable -all

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Binary     PrivilegeControl          {}
Binary     ProcessPrivileges         {}
Binary     Security2                 {}
Manifest   ADRMS                     {}
Manifest   AppLocker                 {}
Manifest   BestPractices             {}
Binary     Microsoft.BestPractice... {}
Manifest   BitsTransfer              {}
Binary     Microsoft.BackgroundIn... {}
Binary     NTFSSecurity              {}
Manifest   NTFSSecurity              {}
Binary     PrivilegeControl          {}
Binary     ProcessPrivileges         {}
Binary     Security2                 {}
Manifest   PSDiagnostics             {}
Script     PSDiagnostics             {}
Manifest   ServerManager             {}
Manifest   TroubleshootingPack       {}

PS C:\Users\admin> import-module NTFSSecurity
Import-Module : The specified module 'NTFSSecurity' was not loaded because no valid module file was found in any module
 directory.
At line:1 char:14
+ import-module <<<<  NTFSSecurity
    + CategoryInfo          : ResourceUnavailable: (NTFSSecurity:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

1 个答案:

答案 0 :(得分:0)

以管理员身份运行您的shell(提升提示)并取消阻止 NTFSSecurity 文件夹中的所有文件。