共享的网络文件夹路径-在Powershell中递归检查文件

时间:2020-10-04 11:21:58

标签: powershell

我有一个脚本,需要用户输入文件夹路径。然后它会递归文件并对其进行哈希处理,而不会进行哈希处理。

我需要的是一种为本地文件夹(C:\ somefolder \ folder)或共享网络文件夹路径(\\ our-of-company-servers-address.com \ folder)输入路径的方法。现在,该脚本无法与网络共享文件夹一起使用,但可以与本地文件夹一起使用。

$folder1 =  (Read-Host -Prompt "Enter path to folder")
$hashes1 = Get-ChildItem -Path ($folder1) -Recurse | Get-FileHash -Algorithm SHA1

0 个答案:

没有答案