Page 2 of 2

Re: Event Handler - Powershell script not able to import mod

Posted: Wed Nov 06, 2019 1:35 pm
by mbellerue
So here's something interesting. I've got a bunch of temp files in /tmp with the .pwsh extension. These are all from yesterday when I was experimenting with Powershell and Event Handler. I just thought I would add this to the thread in case you have any special restrictions on /tmp

Re: Event Handler - Powershell script not able to import mod

Posted: Thu Nov 07, 2019 2:51 pm
by scomdco
I wrote and performed a methodical dissertation on replicating the steps you took, only to find that i was able to successfully import the module from the default, hidden directory that i was not able to do prior. I'm not exactly sure what is the difference this time, i'm assuming maybe i had the directory incorrect, or maybe permissions were not configured as they are now, but it works!!! i appreciate the time you all have taken into assisting me with this, and none of it was wasted as i would not have discovered the solution today if it were not for any of the responses.

For documentation purposes, this is the full command that is working successfully currently for importing the modules. I looked back in the thread and am a little bummed i didn't document how it looked when it was failing prior

Code: Select all

Import-Module -Name /root/.local/share/powershell/Modules/AWS.Tools.Common/3.3.604.0/AWS.Tools.Common.psd1
Import-Module -Name /root/.local/share/powershell/Modules/AWS.Tools.EC2/3.3.604.0/AWS.Tools.EC2.psd1
This thread can be CLOSED :D

Re: Event Handler - Powershell script not able to import mod

Posted: Thu Nov 07, 2019 3:21 pm
by mbellerue
w00t! Glad you got it working! Closing the thread.