none
Get-MpPreference fails: 'Defender' module couldn't be loaded. RRS feed

  • Question

  • Hi, everyone!

    I am on a Windows 8.1 and I am trying to use the Windows Defender WMI providers via Powershell. I have last used this machine about 2 months ago and there were no troubles with it. Now when I run `Get-MpPreference` cmdlet it fails with the message:

    Get-MpPreference : The 'Get-MpPreference' command was found in the module 'Defender', but the module could not be
    loaded. For more information, run 'Import-Module Defender'.
    At line:1 char:1
    + Get-MpPreference
    + ~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Get-MpPreference:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    Following the instruction I tried `Import-Module Defender` which gave me:

    Import-Module : The module to process 'MSFT_MpWDOScan.cdxml', listed in field 'NestedModules' of module manifest
    'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Defender\Defender.psd1' was not processed because no valid module
    was found in any module directory.
    At line:1 char:1
    + Import-Module Defender
    + ~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ResourceUnavailable: (Defender:String) [Import-Module], PSInvalidOperationException
        + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

    Again everything was fine some months ago. And by the way the same thing happened on another machine under Windows 8.1 (an HP laptop).

    I could really use an advice here. Please help)


    Daniel


    • Edited by Daniel.BMSTU Friday, June 29, 2018 12:15 PM
    • Moved by Bill_Stewart Tuesday, July 31, 2018 3:18 PM This is not break/fix forum
    Friday, June 29, 2018 12:13 PM

All replies