[BUG]Get-Command -Module PnP.PowerShell doesn't return anything #4595
Replies: 2 comments
|
Hi, a few things to notice:
You could edit the |
|
This indeed could be problems with versions... the above is running on an Windows 11 VM that's been around for a while and will have had the module installed before. When I ran it yesterday, I got the warning about new version so I updated it. I suspect that VM is now very confused... you're right that Get-Command when it works shows 1.12 but Get-InstalledModule -Name Pnp.PowerShell indicates 2.12.0 is installed (which is why I said 2.12.0): I've got hundreds of PowerShell scripts and not ready to switch to PS 7 just yet. The fact that -ClientId is working on this older version, I might stick with latest v1 for now until I've got time to re-visit. This also explains why it's not working on my new main PC - installed the module but Connect-PnpOnline isn't available at all - Import-Module gave a better error message about incompatible versions. I rolled my PC back as I don't like quirks like this. Is the warning message about updates baked into the code or is it coming from the internet? If the later, then a note about PowerShell versions wouldn't go amiss. The VM is backed up - just going to restore a backup and repeat. |


Uh oh!
There was an error while loading. Please reload this page.
Reporting an Issue or Missing Feature
Issue
Expected behavior
List the cmdlets in the module
Actual behavior
Nothing is listed
Steps to reproduce behavior
Open PowerShell v5.1 and run Get-Command -Module PnP.PowerShell
What is the version of the Cmdlet module you are running?
2.12.0
Which operating system/environment are you running PnP PowerShell on?
Supplemental information.
If you run Get-Command -Module PnP.PowerShell after executing a PnP.PowerShell command (e.g. Connect-PnPOnline), then the cmdlets are listed.
All reactions