Closed juancrl closed 4 years ago
Hello, thanks for opening this issue. We will try to address this as soon as possible and make the module compatible with Strict Mode.
Hello, this was addressed as part of the latest release. I am closing this, please reopen in case you experience further issues. Thanks
When using Strict Mode,
The property 'Count' cannot be found on this object. Verify that the property exists.
At C:\Users\myuser\Documents\PowerShell\Modules\AWS.Tools.Common\4.0.1.1\ImportGuard.ps1 and also At C:\Users\myuser\Documents\PowerShell\Modules\AWSPowerShell\4.0.1.1\ImportGuard.ps1:6 char:13
The .Count property does not exist when a single object is returned in PowerShell. The default promotion to an array does not work in several scenarios, as in this one.
Solution, use the Array cast operator : if ($importingModule.Count -eq 1) { should be if (@($importingModule).Count -eq 1) {
Careful, there's another similar .Count reference in other line. Same problem found in AWSPowerShell module.