gpt4 book ai didi

powershell - 使用Powershell V2清空回收站

转载 作者:行者123 更新时间:2023-12-02 23:20:27 24 4
gpt4 key购买 nike

有没有一种方法可以使用Powershell 2.0清空回收站。

我不想更新Powershell。

最佳答案

您可以通过com对象清除回收站。像这样:

$Shell= New-Object -ComObject Shell.Application 
$Bin = $Shell.NameSpace(10)
foreach ($Item in @($Bin.Items())){Remove-item $Item.Path -Force}

关于powershell - 使用Powershell V2清空回收站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52163330/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com