【发布时间】:2019-02-06 19:56:15
【问题描述】:
在 Azure 上,我使用 microsoft/iis:nanoserver 映像创建了一个 Windows 容器。我正在尝试在其中运行 SharepointPnPPowershellOnline Cmdlet,它会在 Connect-PnPOnline 上引发以下异常。
PS C:\> Connect-PnPOnline -Url https://xyz.sharepoint.com -CurrentCredentials
Could not load type 'System.Security.SecureString' from assembly 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=7bc...'.
At line:1 char:1
+ Connect-PnPOnline -Url https://xyz.sharepoint.com -CurrentC ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], TypeLoadException
+ FullyQualifiedErrorId : System.TypeLoadException
我已经在 windows docker 容器中安装了 AzureAD、SharePointPnPPowerShellOnline 插件。我尝试使用其他连接选项,包括 AccessToken、ClientId、Get-Credentials 等,在所有这些方面,我都面临同样的问题。
非常感谢任何帮助。
【问题讨论】:
标签: .net-core sharepoint-online azure-container-instances powershell-core