clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices
MIT License
4.64k stars 987 forks source link

Import-Module : The required module 'powershell-yaml' is not loaded. #745

Closed leetn00b closed 2 years ago

leetn00b commented 2 years ago

Please verify that you are building from an updated Master branch before filing an issue. Yes

Description of the issue:

While attempting to run the command Import-Module "C:\Tools\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psd1" -Force on the Win10 host, I'm running into the following error message:

Import-Module : The required module 'powershell-yaml' is not loaded. Load the module or remove the module from
'RequiredModules' in the file 'C:\Tools\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psd1'.
At line:1 char:2
+  Import-Module "C:\Tools\AtomicRedTeam\invoke-atomicredteam\Invoke-At ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\Tools\Atomic...micRedTeam.psd1:String) [Import-Module], Missing
   MemberException
    + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCommand

Relavent documentation:

https://www.detectionlab.network/usage/atomicredteam/

leetn00b commented 2 years ago

The following command in powershell fixes this:

Install-Module -Name powershell-yaml -Force
clong commented 2 years ago

Fixed: https://github.com/clong/DetectionLab/commit/caf5a23622b7a649d5f5fd1519f7b5eecb963739