cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AWS test connection is failed in FNMS 2022 R1.

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

(9) Replies

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?

It's not in EC2. Perquisites are already fulfilled.

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

Hi @lajanakiram ,

Thanks for your response. AWS powershell installed version is:

Amazon Web Services SDK for .NET
Core Runtime Version 3.7.11.6

Hi! @i_bhavik, Have you got it resolved, please?

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

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

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

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.

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)