PSS Version: 2018 5.5.149 x64
OS Version: Windows 10 x64 1709
WMF Version: 5.1
Impact: Minor
Symptoms:
PowerShell Studio will detect each version of installed modules separately and list each command multiple times during Primal Sense
Reproducibility:
Install two different versions of the same module, then rebuild cache and check module list or type command from module
[PSS 2018][Bug] Duplicate modules & commands
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: [PSS 2018][Bug] Duplicate modules & commands
This is true. PowerShell Studio will list the same command if it exist across existing modules.
At the same time, Primalsense will display all command, and when you highlight the command it will show from which module is been used.
(See image) There's a couple of ways to handle this issue:
1. Use the "Edit Cache" option to Enable/Disable" the module then "Build Cache" to refresh the Object Browser.
2. Or, you can add the module namespace to the cmdlet by using Ctrl-Shift-Space (ie. SqlServer\Invoke-SqlCmd).
Using Primalsense to pick the cmdlet, PowerShell Studio will add the "Import-Module" line that belongs to the command.
Hope this helps!
At the same time, Primalsense will display all command, and when you highlight the command it will show from which module is been used.
(See image) There's a couple of ways to handle this issue:
1. Use the "Edit Cache" option to Enable/Disable" the module then "Build Cache" to refresh the Object Browser.
2. Or, you can add the module namespace to the cmdlet by using Ctrl-Shift-Space (ie. SqlServer\Invoke-SqlCmd).
Using Primalsense to pick the cmdlet, PowerShell Studio will add the "Import-Module" line that belongs to the command.
Hope this helps!
Re: [PSS 2018][Bug] Duplicate modules & commands
Heya Max,
problem is, it lists it for every single copy of the same module (whether equal or different version numbers).
In some cases, that means I've got ten times the same command on the list, which is slightly inconvenient (it also doesn't tell me for which version it is, if picking different versions would make a difference, which I don't see coming).
Don't use auto-insert Import-Module, so I can't answer to that.
Not a big issue, but a lesser nuisance. For debugging purposes, I sometimes need to have different versions at hand, sometimes I'm just too lazy to clean them up.
Just think that picking the latest version of the same module (and ignoring older versions) would be the reasonable choice from a development perspective, given that currently I don't see there being a meaningful toolkit to select between which version to target.
problem is, it lists it for every single copy of the same module (whether equal or different version numbers).
In some cases, that means I've got ten times the same command on the list, which is slightly inconvenient (it also doesn't tell me for which version it is, if picking different versions would make a difference, which I don't see coming).
Don't use auto-insert Import-Module, so I can't answer to that.
Not a big issue, but a lesser nuisance. For debugging purposes, I sometimes need to have different versions at hand, sometimes I'm just too lazy to clean them up.
Just think that picking the latest version of the same module (and ignoring older versions) would be the reasonable choice from a development perspective, given that currently I don't see there being a meaningful toolkit to select between which version to target.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: [PSS 2018][Bug] Duplicate modules & commands
I can tell you that we are working on a feature to better manage all installed modules.
I understand what you're saying!
And Yes! The other solution would be to cleanup all unwanted modules so you can work with only the ones you need.
It's a little tedious to cleanup. Using the "Edit Cache", remove all unwanted modules, and then do the "Build Cache".
All selected modules will remain listed in the "Object Browser" even exiting and restarting PowerShell Studio.
This will work until the next version gets updated, or if you click on the "Refresh Local Cache" option.
I'm sure we'll have something soon to address this issue.
Let me know if it works for you.
I understand what you're saying!
And Yes! The other solution would be to cleanup all unwanted modules so you can work with only the ones you need.
It's a little tedious to cleanup. Using the "Edit Cache", remove all unwanted modules, and then do the "Build Cache".
All selected modules will remain listed in the "Object Browser" even exiting and restarting PowerShell Studio.
This will work until the next version gets updated, or if you click on the "Refresh Local Cache" option.
I'm sure we'll have something soon to address this issue.
Let me know if it works for you.
Re: [PSS 2018][Bug] Duplicate modules & commands
We released a new service build (v5.5.150). Please let us know if the issue persists.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.