Skip to content
Advertisement

Powershell Linux Sharepoint Management

I installed powershell (pwsh) on Ubuntu 20.4. I am trying to manage some Sharepoint stuff. I did the following:

PS /home/polar> Install-Module -Name Microsoft.Online.SharePoint.PowerShell

And it installed. So, I thought.

I cannot access any commands, such as Get-SPOSiteDesign, etc.

I list the modules I have:

PS /home/polar> Get-Module -ListAvailable

From the following result, it seems the problem is that there are not any ExportedCommands from the Microsoft.Online.SharePoint.PowerShell package.

What am I doing wrong?

Directory: /home/polar/.local/share/powershell/Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     16.0.2121…            Microsoft.Online.SharePoint.PowerS… Desk      

    Directory: /opt/microsoft/powershell/7/Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Manifest   1.2.5                 Microsoft.PowerShell.Archive        Desk      {Compress-Archive, Expand-Archive}
Manifest   7.0.0.0               Microsoft.PowerShell.Host           Core      {Start-Transcript, Stop-Transcript}
Manifest   7.0.0.0               Microsoft.PowerShell.Management     Core      {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path…}
Manifest   7.0.0.0               Microsoft.PowerShell.Security       Core      {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString…}
Manifest   7.0.0.0               Microsoft.PowerShell.Utility        Core      {Export-Alias, Get-Alias, Import-Alias, New-Alias…}
Script     1.4.7                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script     2.2.5                 PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
Script     2.0.5                 PSDesiredStateConfiguration         Core      {Configuration, New-DscChecksum, Get-DscResource, Invoke-DscResource}
Script     2.1.0                 PSReadLine                          Desk      {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption…}
Binary     2.0.3                 ThreadJob                           Desk      Start-ThreadJob

Advertisement

Answer

The Sharepoint module is for Windows PowerShell Edition and not for PowerShell Core Edition :

PSEdition
---------
Desk

Desk = Windows PowerShell

Core = PowerShell Core

In other terms, the Sharepoint doesn’t work on Linux.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement