使用powershell的空的回收站 [英] Empty recycle bin using powershell
本文介绍了使用powershell的空的回收站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
以下是我试图删除回收站中内容的代码。但执行后也没有删除文件
请告诉我这是什么问题。
我我在Windows Server 2012 R2 64位上运行代码。
我尝试过:
$ Shell = New-Object -ComObject Shell.Application
$ RecBin = $ Shell.Namespace(0xA)
$ RecBin.Items() | %{Remove-Item $ _。路径-Recurse -Confirm:$ false}
Hi all
below is the code i am trying to delete content in recycle bin. but after executing also it's not deleting the files
Please let me know whats the issue.
I am running the code at windows server 2012 R2 64-bit.
What I have tried:
$Shell = New-Object -ComObject Shell.Application
$RecBin = $Shell.Namespace(0xA)
$RecBin.Items() | %{Remove-Item $_.Path -Recurse -Confirm:$false}
推荐答案
Shell = New-Object -ComObject Shell.Application
Shell = New-Object -ComObject Shell.Application
RecBin =
Shell.Namespace(0xA)
Shell.Namespace(0xA)
这篇关于使用powershell的空的回收站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文