2

Can somebody explain what did I miss?

I'm trying to import NTFSSecurity PowerShell module.
The folder is extracted at C:\Windows\system32\WindowsPowerShell\v1.0\Modules\, and I've also changed the execution policy.

I'm still receiving the following error: My system is running on the Windows 2008R2 operating system with PowerShell 2.0 installed

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

2 Answers 2

1

Run your shell as administrator(elevated prompt) and unblock all the files in NTFSSecurity folder.

Sign up to request clarification or add additional context in comments.

3 Comments

Tried unblocking the files. PS is running in elevated mode. Same red error: File list of NTFSSEcurity folder: NTFSSecurity-Help.xml NTFSSecurity.dll NTFSSecurity.format.ps1xml NTFSSecurity.Init.ps1 NTFSSecurity.pdb NTFSSecurity.psd1 NTFSSecurity.types.ps1xml PrivilegeControl.dll PrivilegeControl.pdb ProcessPrivileges.dll ProcessPrivileges.pdb Security2.dll Security2.pdb
Is this a 64bit box? If so, are you running 64bit powershell?
Thanks. It was blocked files.
0

My issue was I was seeing this errors only during the azure devops pipeline deployment and so, I tried uninstall and re-install az modules and removed azurerm but nothing worked till I installed powershell 7.4.1

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.