I have a C# PSCmdlet class for implementing a PowerShell command and I want to get my module version while running the command.
I don't want to get the version from the assembly location because I need the actual version loaded (it can be different, for example, if I keep PowerShell open while upgrading my module, the assembly will point to the upgraded version and I won't get the one that already loaded).
I need something like Get-Module for the current session but from my C# command code.
How can I do it?