3

当我尝试运行以下命令时:

PS /Users/<user>> Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/<site>

我收到此错误:

Connect-PnPOnline: Unable to load shared library 'Advapi32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libAdvapi32.dll, 1): image not found

什么是“Advapi32.dll”,我该如何解决?

我的环境:
macOS 10.15.3
PowerShell 7.0.0,使用自制软件安装(如此处所述
SharepointPnpPowerShellOnline,安装如下:Install-Module SharePointPnPPowerShellOnline.

4

1 回答 1

1

这里的解决方法是使用 tbe 设备登录方法,这将是

Connect-PnPOnline -PnPO365ManagementShell

它对我来说就像一个魅力。

这种方法会要求您使用浏览器输入代码并在浏览器中进行身份验证。

有用的上下文和来源:https ://www.erwinmcm.com/cross-platform-pnp-powershell/

于 2020-10-20T22:18:02.090 回答