SOLVED

PowerShell Module Version Confusion

Silver Contributor

When I do a Get-Module -ListAvailable, I see the following. Both show the same cmdlets, Why are there 2 modules shown for PnP? Why are they in different locations? Why are the version numbers so different?

 

Directory: C:\Users\dgross.CSG\Documents\WindowsPowerShell\Modules


ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 0.5.0.0 OfficeDevPnP.PowerShell.Commands {Get-SPOWebTemplates, Get-SPOTimeZoneId, Set-SPOTenantSite, Uninstall-SPOAppInstance...}

and

Directory: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------

Binary 2.8.1610.0 SharePointPnPPowerShellOnline {Get-SPOWebTemplates, Get-SPOTimeZoneId, Set-SPOTenantSite, Uninstall-SPOAppInstance...}

@Erwin van Hunen

3 Replies

You for instance might have tried compiling the cmdlets yourself in Visual Studio a long time ago (hence the old version number) and while doing that it gets installed by default in the c:\users\<username>\Documents\WindowsPowershell\Modules folder.

 

Simply remove that folder and you're set.

 

2.8.1610.0 is the latest version.

best response confirmed by VI_Migration (Silver Contributor)
Solution

When I say 'remove that folder' do -not- remove c:\users\<yourusername>\Documents\WindowsPowerShell\Modules obviously, but remove the folder inside that folder that contains the older version of the cmdlets.

Thanks, that is exactly what happened.
1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

When I say 'remove that folder' do -not- remove c:\users\<yourusername>\Documents\WindowsPowerShell\Modules obviously, but remove the folder inside that folder that contains the older version of the cmdlets.

View solution in original post