2015-07-20 75 views
0

嗨我有一些文件在网络共享,我需要删除ReparsePoint属性。我曾试图设置这些文件属性为“正常”,但它并没有从这些文件中删除“ReparsePoint”ReparsePoint属性删除PowerShell

Clear-Host 
$Path = "\\network\share" 
Get-ChildItem $Path -recurse -force | ForEach { 
($_.Attributes = "normal") 
} 

如何删除“ReparsePoint”属性?

+0

你确定你想做什么?对我来说,你似乎试图执行类似于“从文件中删除'文件'属性”的操作。 – ALIENQuake

+0

我有一些stube链接无法访问存档,我需要将它们移动到其他位置以供将来参考,但复制操作失败。供应商告诉我,我需要删除ReparsePoint属性,然后才能复制这些文件。上面的代码只是一个例子,只是为了查找损坏的文件而被更改。只是不知道如何命令我可以管get-childitem的结果来删除ReparsePoint属性 – Szafa

回答

0

看起来像我找到了在ReparsePoint上工作的工具。

FSUTIL reparsepoint删除FILE_NAME

Clear-Host 
$Path = "\\network\share" 
Get-ChildItem $Path -recurse -force | Where-Object {($_.Length -like 1022) | ForEach { 
fsutil reparsepoint delete $_ } 
} 
+0

所以你想删除reparsepoint。这首先不是你问的。 – ALIENQuake