OnedriveMapper.ps1 4.04脚本显示网络驱动器

问题描述

我正在使用https://gitlab.com/Lieben/OnedriveMapper_V3/-/blob/master/OneDriveMapper.ps1

中著名的Onedrivemapper 4.04 powershell脚本

这基本上用于将Sharepoint添加为网络驱动器。当我在脚本中提及我的sharepoint链接并运行时,它表明该驱动器已映射,但该驱动器未在我的计算机中显示

Error_Screenshot

解决方法

问题是“ ... DavWWWRoot \\ teamsite ...”双反斜杠,因此net use命令会引发错误。

将此添加到他的4.04脚本的第608行中,它应该可以工作:

incident_tagged = [tokenize(df.iloc[i]['Title']) for i in tagged_list]
incident_tagged = [tokenize(df.iloc[j]['Title']) for j in untagged_list] # I want to append the results in incident_tagged 

您的代码应如下所示:

$driveMapping.webDavPath = $driveMapping.webDavPath.Replace('DavWWWRoot\\','DavWWWRoot\')

我知道它很脏,但是我不想遍历3000行代码来解决这个问题