Rename to windefender.ps1

This commit is contained in:
Markus Fleschutz 2023-10-31 13:14:22 +01:00
parent 020e1fa30b
commit b1845110bb
4 changed files with 5 additions and 71 deletions

View File

@ -88,7 +88,7 @@ Mega Collection of PowerShell Scripts
| [restart-network-adapters.ps1](scripts/restart-network-adapters.ps1) | Restarts all local network adapters. [Read more...](docs/restart-network-adapters.md)| | [restart-network-adapters.ps1](scripts/restart-network-adapters.ps1) | Restarts all local network adapters. [Read more...](docs/restart-network-adapters.md)|
| [upgrade-ubuntu.ps1](scripts/upgrade-ubuntu.ps1) | Upgrades Ubuntu Linux to the latest (LTS) release. [Read more...](docs/upgrade-ubuntu.md) | | [upgrade-ubuntu.ps1](scripts/upgrade-ubuntu.ps1) | Upgrades Ubuntu Linux to the latest (LTS) release. [Read more...](docs/upgrade-ubuntu.md) |
| [wake-up.ps1](scripts/wake-up.ps1) | Wakes up a computer using Wake-on-LAN. [Read more...](docs/wakeup.md) | | [wake-up.ps1](scripts/wake-up.ps1) | Wakes up a computer using Wake-on-LAN. [Read more...](docs/wakeup.md) |
| [WinDefender.ps1](scripts/WinDefender.ps1) | Turn Windows Defender on/off/check real time monitoring. [Read more...](docs/WinDefender.md) | | [windefender.ps1](scripts/windefender.ps1) | Turn Windows Defender on/off/check real time monitoring. [Read more...](docs/windefender.md) |
💻 Scripts for the Desktop 💻 Scripts for the Desktop

View File

@ -1,66 +0,0 @@
Windefender.ps1
================
This PowerShell script check for windwos defender status and also turn off/on real time monitoring of windows defender.
Example
-------
```powershell
PS> ./Windefender.ps1
```
<#
.SYNOPSIS
Windows defender in powershell
.DESCRIPTION
This script can enable disable and show windows defender real time monitoring!
.EXAMPLE
PS> ./Windefender.ps1
.LINK
https://github.com/pakoti/Awesome_Sysadmin
.NOTES
Author: Dark Master | License: CC0-1,0
#>
$defender = Get-MpPreference
$userInput = Read-Host "Enter an option:
[1] Disable real time monitoring
[2] Enable real time monitoring
[3] Check status
"
switch($userInput) {
1 {
$defender.DisableRealtimeMonitoring = $true
$defender | Set-MpPreference
Write-Host "Real-time monitoring of Windows Defender has been disabled."
break
}
2 {
$defender.DisableRealtimeMonitoring = $false
$defender | Set-MpPreference
Write-Host "Real-time monitoring of Windows Defender has been enabled."
break
}
3 {
if($defender.DisableRealtimeMonitoring) {
Write-Host "Real-time monitoring of Windows Defender is currently disabled."
} else {
Write-Host "Real-time monitoring of Windows Defender is currently enabled."
}
break
}
default {
Write-Host "Invalid option selected."
break
}
}

View File

@ -1,10 +1,10 @@
<# <#
.SYNOPSIS .SYNOPSIS
Windows defender in powershell Configure Windows defender
.DESCRIPTION .DESCRIPTION
This script can enable disable and show windows defender real time monitoring! This script can enable / disable and show Windows defender real time monitoring!
.EXAMPLE .EXAMPLE
PS> ./Windefender.ps1 PS> ./windefender.ps1
.LINK .LINK
https://github.com/pakoti/Awesome_Sysadmin https://github.com/pakoti/Awesome_Sysadmin
.NOTES .NOTES