- 帖子
- 183
- 积分
- 384
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2008-12-19
|
33楼
发表于 2021-7-22 12:23
| 只看该作者
@powershell -c "Get-Content '%~0' | Select-Object -Skip 1 | Out-String | Invoke-Expression" & pause & exit
$program = "D:\AAA.exe"
New-NetFirewallRule -DisplayName "阻断一次" -Profile Private,Public -Direction Outbound -Program $program -Action block
$count = 0
do
{
$count += 1
write-host "count:" $count
Enable-NetFirewallRule -DisplayName "阻断一次"
start-sleep 5
disable-NetFirewallRule -DisplayName "阻断一次"
start-sleep 8
}
while {$true}
提示错误 |
|