我的计划是将多个SharePoint URL嵌入为网络驱动器,以便为我和所有同事更轻松地访问文件。我想为执行此任务的每个人部署一个脚本,并将其放入启动文件夹中。
脚本本身可以正常工作,但我很遗憾地偶然发现本文所述的文件下载限制:
问题是,在 HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ WebClient \ Parameters 是不可行的,因为您需要管理员权限。因此,以下PowerShell脚本失败,并显示“权限被拒绝”失败...
PS HKLM:\SYSTEM\CurrentControlSet\Services\webclient\Parameters> Set-ItemProperty -Path . -Name FileSizeLimitInBytes -Value 500000000
Set-ItemProperty : Der angeforderte Registrierungszugriff ist unzulässig.
In Zeile:1 Zeichen:1
+ Set-ItemProperty -Path . -Name FileSizeLimitInBytes -Value 500000000
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (HKEY_LOCAL_MACH...ient\Parameters:String) [Set-ItemProperty],SecurityException
+ FullyQualifiedErrorId : system.security.SecurityException,microsoft.PowerShell.Commands.SetItemPropertyCommand
是否可以将注册表项添加到HK_Current_User来完成这项工作?注册表的该部分,可以由PowerShell轻松编辑,而无需管理员权限。