There seems to be an issue when attempting to import the module as a part of a users profile. In my profile I determine which version of PowerShell I'm using and the platform. If its Core edition on Windows, install the module, if its not found, and then immediately import it. After the install (successful), immediately on the import, I get the following error:
Regardless of attempts to suppress the error ('-ErrorAction SilentlyContinue', assignment to $null, or pipe to Out-Null), the error persists. I can, however, immediately import the module without issue once I get the prompt.
For your information:
PS > $PSVersionTable
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
There seems to be an issue when attempting to import the module as a part of a users profile. In my profile I determine which version of PowerShell I'm using and the platform. If its Core edition on Windows, install the module, if its not found, and then immediately import it. After the install (successful), immediately on the import, I get the following error:![image](https://user-images.githubusercontent.com/925581/65819381-6c289180-e1e1-11e9-9275-0845dbea8a6b.png)
Regardless of attempts to suppress the error ('-ErrorAction SilentlyContinue', assignment to $null, or pipe to Out-Null), the error persists. I can, however, immediately import the module without issue once I get the prompt.
For your information: