Bloquer définitivement onedrive
Il me saoule, il n'arrête pas de revenir...
1. Mettre en place une règle firewall
| Commande Powershell: |
| taskkill /IM OneDrive.exe /F 2>$null; Get-NetFirewallRule -DisplayName "Bloquer OneDrive*" -ErrorAction SilentlyContinue | Remove-NetFirewallRule; $paths=@("$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe","C:\Program Files\Microsoft OneDrive\OneDrive.exe","C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe"); $paths | Where-Object {Test-Path $_} | ForEach-Object {New-NetFirewallRule -DisplayName "Bloquer OneDrive sortant - $($_)" -Direction Outbound -Program $_ -Action Block -Profile Any -Enabled True}; $paths | Where-Object {Test-Path $_} | ForEach-Object {New-NetFirewallRule -DisplayName "Bloquer OneDrive entrant - $($_)" -Direction Inbound -Program $_ -Action Block -Profile Any -Enabled True} |
2. Vérifier:
| Get-NetFirewallRule -DisplayName "Bloquer OneDrive*" | Select-Object DisplayName,Enabled,Direction,Action |
| Résultat Attendu: DisplayName Enabled Direction Action ----------- ------- --------- ------ Bloquer OneDrive sortant - C:\Program Files\Microsoft OneDrive\OneDrive.exe True Outbound Block Bloquer OneDrive entrant - C:\Program Files\Microsoft OneDrive\OneDrive.exe True Inbound Block |
3. Pour voir les chemins bloqués
| Get-NetFirewallRule -DisplayName "Bloquer OneDrive*" | Get-NetFirewallApplicationFilter | Select-Object Program |
| Résultat Attendu: Program ------- C:\Program Files\Microsoft OneDrive\OneDrive.exe C:\Program Files\Microsoft OneDrive\OneDrive.exe |
/image%2F0881799%2F20140610%2Fob_a8c7fe_logo2.jpg)
Commenter cet article