sharepoint management POWERSHELL が起動時にERRORになります。

kurisu 1 Reputation point
2020-12-14T23:09:30.407+00:00

sharepoint management POWERSHELL が起動時にERRORになります。

再インストールしても改善されません

Import-Module : アセンブリ 'Microsoft.SharePoint.Client.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=7

1e9bce111e9429c' から型 'Microsoft.SharePoint.Client.Publishing.PortalLaunch.PortalLaunchRedirectionType' を読み込めま

せんでした。

発生場所 行:1 文字:1

  • Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChec ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException
    • FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,600 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,359 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Echo Du_MSFT 17,116 Reputation points
    2020-12-15T02:21:55.373+00:00

    Hi @kurisu ,

    Currently, the Q&A forum only supports English Support. I suggest you translate the issue into English.

    --------------------------

    Translated from Translation Tool:

    Sharepoint management POWERSHELL will get an ERROR at Startup.

    Reinstalling doesn't help!

    Import-Module: Assembly'Microsoft.SharePoint.Client.Publishing, Version = 16.0.0.0, Culture = neutral, PublicKeyToken = 7

    1e9bce111e9429c':Can read the type'Microsoft.SharePoint.Client.Publishing.PortalLaunch.PortalLaunchRedirectionType'

    Could not.

    Location Line: 1 Character: 1

    -----------------------------------

    The issue is due to DLL Version mismatch. The SharePoint Online Management Shell stores the required components in "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell". In the location we can see a “Microsoft.Online.SharePoint.Client.Tenant.DLL” and found two different versions of file.

    Please reinstalled and checked the SharePoint Online Management Module to fix this issue.

    You could refer to this article to get more information:

    SharePoint Online Troubleshooting: Import-Module - Could not Load Assembly (Version Issue)

    Thanks,
    Echo Du

    ——————————— Updated Answer ——————————

    Hi @kurisu ,

    48296-error.png

    This is due to DLL Version mismatch. To resolve the issue, follow these steps:

    1. Uninstall SharePoint Online Management Shell and SharePoint Online Client SDK if installed
    2. Delete SharePoint Online Client Assemblies from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL. Remove all Folders starting with name: Microsoft.SharePoint *
    3. Uninstall the module with "Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell"
    4. Reinstall the module "Install-Module -Name Microsoft.Online.SharePoint.PowerShell"

    Thanks,
    Echo Du

    ========================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. kurisu 1 Reputation point
    2020-12-15T07:55:38.997+00:00

    SharePoint Online Client Components SDK
    の、バージョンを一つ古いのにしましたが、それでもダメでした。

    動くマシンを確認したところ、上記のライブラリがインストールされていませんでしたので、アンインストールしました。

    これを、Unistallすれば動きました!!!。

    ありがとうございました。助かりました。


  3. kurisu 1 Reputation point
    2020-12-15T08:07:01.273+00:00

    SharePoint Online Client Components SDK のバージョンを一つ古いのにしましたが、ダメでしたが。

    可能なマシンを確認したところ、インストールされていませんでしたので、
    アンインストールしたところ、動作が正常になりました!!!

    CSOMの設定ができなくなりますね。

    0 comments No comments