The code to install PSINI installs the latest version (as of right now 2.0.7) but your import-module command requires a specific version, 2.0.5. Because version 2.07 is what's installed, the import command will fail.
If there's a specific requirement for 2.0.5, the install command should install 2.05. If the requirement is for 2.0.5 or above, the import module should use the -MinimumVersion option instead of -RequiredVersion
|
Import-Module PsIni -ErrorAction Stop -WarningAction Stop -RequiredVersion 2.0.5 |