Hi,
In FNMS 2022 R1 AWS integration connection is failed with the following error:
Error: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to load module: 'AWSPowerShell' - 'Unable to load AWS Tools for Windows PowerShell. Ensure prerequisite is installed as per https://aws.amazon.com/powershell/'
Thanks,
Bhavik
‎May 26, 2022 12:47 PM
I'm going to assume that you have done the PowerShell tools install perquisite as it stated?
Is the beacon running as an EC2, or outside of AWS?
‎May 26, 2022 01:21 PM
It's not in EC2. Perquisites are already fulfilled.
‎May 26, 2022 10:45 PM
Hi @bhavik
What version of AWS powershell did you install?
Execute: Get-AWSPowerShellVersion -ListServiceVersionInfo
Refer the below link to install the latest one.
https://www.powershellgallery.com/packages/AWS.Tools.Common/4.1.13.0
‎May 27, 2022 03:46 AM
Hi @lajanakiram ,
Thanks for your response. AWS powershell installed version is:
Amazon Web Services SDK for .NET
Core Runtime Version 3.7.11.6
‎May 27, 2022 04:20 AM
Hi! @i_bhavik, Have you got it resolved, please?
‎Sep 09, 2022 02:10 AM
Hi! @ChrisG, could you kindly share your inputs? It is highly critical to us and we experienced this only after the upgrade to v2022R1.
Please advise.
Thanks,
Bhupesh
‎Sep 10, 2022 02:16 AM
Checking details of the AWSPowerShell module installation may help for troubleshooting this. For example, executing PowerShell commands like the following (as the FNMS service account, if relevant) can verify the module is installed can can be imported:
Get-Module -Name AWSPowerShell -ListAvailable
Import-Module -Force -Name AWSPowerShell
‎Sep 12, 2022 02:10 AM
Thanks for looking into it, @ChrisG.
The server has AWSPowershell version 4.1.3.0 installed (attached). We made this work by modifying the "ERRORACTIONPREFERENCE from STOP to SILENTLYCONTINUE' in the file logic.ps1 of the AWS connector. However, we're not sure if this is the right way to do this (because it's not looking for any errors now, it seems). Kindly advise of other details required.
‎Sep 12, 2022 09:46 PM - edited ‎Sep 12, 2022 09:47 PM
So that suggests the PowerShell module is installed, but the error suggests that the module cannot be loaded for some reason.
Here's a (modified) version of the PowerShell script that is running and producing the error you're seeing here. Maybe you can use this script as a starting point to further troubleshoot what is going on.
$Path = "C:\Program Files (x86)\AWS Tools\PowerShell\"
$Name = "AWSPowerShell"
if ($env:PSModulePath -notmatch [Regex]::Escape($Path)) {
Test-Path -Path $Path
$env:PSModulePath = $env:PSModulePath + ";" + $Path
}
if ($null -eq (Get-Module -Name $Name) -and $null -eq (Get-Module -Name $Name -ListAvailable)) {
Write-Error "Unable to load module: '$Name' - 'Unable to load AWS Tools for Windows PowerShell. Ensure prerequisite is installed as per https://aws.amazon.com/powershell/'"
}
Note that if this script runs successfully when you try it then there may be some difference in the context of the user account you're using compared to the user account that the import process is using which may be causing you a problem.
‎Sep 26, 2022 03:27 AM