Repository navigation
Description
Description
I prepared an extensive script using PSIni, and in order not to rewrite it, I decided to run PowerShell in Linux.
The module installation proceeded without errors, but it was not possible to use this add-on. After analysis, it turned out that the module was installed in a directory with a structure that did not allow the module to be loaded.
When I changed the structure and changed the name of the directory where the module is located (case sensitive in Unix), it was correctly recognised.
Steps To Reproduce
- Start Powershell as a user
pwsh - Install PIini module
Install-Module PSIni - List the tree structure
tree -L 3 -N ~/.local/share/powershell - Received
├── Modules
│ └── PsIni
│ └── 4.0.0
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── PSGetModuleInfo.xml
│ ├── PSIni.psd1
│ ├── PSIni.psm1
│ └── README.md
Expected behaviours
With the structure as below, the module is recognised correctly.
├── Modules
│ └── PSIni
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── PSGetModuleInfo.xml
│ ├── PSIni.psd1
│ ├── PSIni.psm1
│ └── README.md
Your Environment
System: Zorin OS - based on Ubuntu 22.04
Powershell: 7.5.1
Get-Module PSIni -ListAvailable | Select Name, Version
Name Version
---- -------
PSIni 4.0.0
$PSVersionTable
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Zorin OS 17.3
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Possible Solution
Be consistent in naming directories and files concerning case. In UNIX, this matters, but in Windows, it doesn't bother.
If possible, adjust the module's installation path.
Activity
trippingtarballs commentedon Aug 8, 2025
Why is this happening?
The clue is in the verbose output of the
Install-Modulecommand:PowerShell does a lookup of
PSIni, matches it toPsIni, and create a folder based on that match:/root/.local/share/powershell/Modules/PsIni/4.0.0/...This tells me that
PSIniwas originally published to the PowerShell Gallery asPsIni.Indeed, this metadata is even present in the store listing: https://www.powershellgallery.com/packages/PsIni
Presumably, somewhere in the history of the project it was decided the module should be known as
PSIniand notPsIni, and this change came after the store listing was created.What to do about it?
Honestly, I have no idea ... PowerShell claims to support Linux & macOS, alongside Windows. I don't understand how that can be claimed without provision for case-sensitive filesystems being made.
As a workaround I will rename the folder on Linux (see replication steps below) after install.
🤷
Replication Options
To replicate on CI
Using GitHub Actions:
To replicate locally
Using Podman:
$ podman run -it --rm mcr.microsoft.com/azure-powershell WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64) PowerShell 7.5.0 PS />Now you have a Linux-based case-sensitive OS running PowerShell you can replicate these same steps.
PSIni:PSIniis installed:PSInimodule:PsInitoPSIni:joeskeen commentedon Nov 8, 2025
This is indeed a very edge-case issue with cross-platform PowerShell.
Normally when using PS on Linux/Mac, it behaves as it would on Windows with case-insensitive operations.
In this case, though, it is not.
I ran into a hard blocker because of this on my Linux box.
Is it possible we could bring this up as a bug in the PowerShell repository?
Edit: Actually there are some related issues:
PowerShell/PowerShell#17342
PowerShell/PSResourceGet#1402
PowerShell/PSResourceGet#1446
I would say those issues block this one?