Closed ecspresso closed 3 years ago
This seems to happen when there is no profile data and $tmp_config.ITGlue_API_key
is null
. Simply adding -ErrorAction SilentlyContinue
should resolve this since you can set a variable to empty data but you cannot convert a null string.
ConvertTo-SecureString -String $null -Force -ErrorAction SilentlyContinue
generates an error even with SilentlyContinue and that the module is still imported.
The issue here was that I managed to run Export-ITGlueModuleSettings
with an API key set or in some other way create the config.psd1
file, causing an error when running the import.
Steps to reproduce
Import-Module -Name ITGlueAPI
asnt_authority\system
Expected behavior
Import the module.
Actual behavior
Environment
Please share additional details about your environment. Version information for:
ITGlueAPI: 2.1.0
Operating System