Powershell Linux Sharepoint 管理

Powershell Linux Sharepoint Management

我在 Ubuntu 20.4 上安装了 powershell (pwsh)。我正在尝试管理一些 Sharepoint 内容。我做了以下事情:

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

它安装了。所以,我想。

我无法访问任何命令,例如 Get-SPOSiteDesign

我列出了我拥有的模块:

PS /home/polar> Get-Module -ListAvailable

从下面的结果来看,问题似乎出在 Microsoft.Online.SharePoint.PowerShell 包中没有任何 ExportedCommands

我做错了什么?

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

Sharepoint 模块适用于 Windows PowerShell 版,不适用于 PowerShell Core 版:

PSEdition
---------
Desk

办公桌 = Windows PowerShell

核心 = PowerShell 核心

换句话说,Sharepoint 不适用于 Linux。