Forum Discussion
Dean_Gross
Oct 11, 2016Silver Contributor
PowerShell Module Version Confusion
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...}
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.
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.
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.
- Dean_GrossSilver ContributorThanks, that is exactly what happened.