Local Group policy module issue

Welcome Forums General PowerShell Q&A Local Group policy module issue

This topic contains 4 replies, has 3 voices, and was last updated by

3 months, 3 weeks ago.

  • Author
  • #112535

    Points: 0
    Rank: Member

    I am new to powershell, I would like to update some of the local group policies using powershell. i am trying to import "policyfileeditor' module and getting this error.

    Any help will be highly appreciated.

    PS C:\> Import-Module -Name PolicyFileEditor

    Import-Module : The specified module 'PolicyFileEditor' was not loaded because no valid module file was found in any

    module directory.

    At line:1 char:1

    + Import-Module -Name PolicyFileEditor

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ResourceUnavailable: (PolicyFileEditor:String) [Import-Module], FileNotFoundException

    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

  • #112552

    Points: 504
    Helping Hand
    Rank: Major Contributor

    This is not a default PS module. Install-Module, should just hit the MS PowerShellGallery to get it, but some folks have had issues with doing it that way.

    You have to download and install it to use it.

    Try this... Run as admin (the noisy way to see all of what is going on)


    Find-Module -Name PolicyFileEditor
    Version    Name                                Type       Repository           Description
    -------    ----                                ----       ----------           -----------
    3.0.1      PolicyFileEditor                    Module     PSGallery            Commands and....
    Find-Module -Name PolicyFileEditor -Verbose | Save-Module -Path '$env:USERPROFILE\Documents\WindowsPowerShell\Modules' -Verbose -Force
    Install-Module -Name PolicyFileEditor -Verbose -Force

    Now, in some cases, a few have had issues even doing this this way on some systems, which often means this is an environmental issue.

    • #112588

      Points: 0
      Rank: Member

      Thank you for the quick reply.

      I downloaded policyfileeditor.3.0.0.nupkg and put it  in my C:\temp but still was unable to import it.

  • #112591

    Points: 437
    Helping Hand
    Rank: Contributor
    Import-Module -Name c:\temp\PolicyFileEditor
  • #112592

    Points: 504
    Helping Hand
    Rank: Major Contributor

    All modules must be in the defined PS module path. because that is where PS will only look.

    # https://docs.microsoft.com/en-us/powershell/developer/module/modifying-the-psmodulepath-installation-path

    If you put it somewhere else you have to fully qualify the path to that location.

The topic ‘Local Group policy module issue’ is closed to new replies.