File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Get-AzMaintenanceUpdate - ResourceGroupName ' <>-rg' - ProviderName Microsoft.Compute - ResourceType virtualMachines - ResourceName azcrtdccra01
2+ <#
3+ MaintenanceScope : OSImage
4+ ImpactType : Restart
5+ Status : Pending
6+ ImpactDurationInSec : 3600
7+ ResourceId : /subscriptions/<>/resourcegroups/<>-rg/providers/Microsoft.Compute/virtualMachines/azcrtdccra01
8+
9+
10+ MaintenanceScope : Extension
11+ ImpactType : Restart
12+ Status : Pending
13+ ImpactDurationInSec : 3600
14+ ResourceId : /subscriptions/<>/resourcegroups/<>-rg/providers/Microsoft.Compute/virtualMachines/azcrtdccra01
15+ #>
Original file line number Diff line number Diff line change 1+ Set-MpPreference - DisableBehaviorMonitoring $false
2+ Set-MpPreference - ScanScheduleDay 1
3+
4+ Set-MpPreference - ScanScheduleTime 22 :00 :00
5+
6+
7+ # Gets Vm's in a resource group, enables real time protection and configures AV scanning for 5:00 AM on Sundays
8+ (Get-AzureRmVM - ResourceGroupName NLGSUSUTMRASRG2).Name|
9+ ForEach-Object {Invoke-Command - ComputerName $PSItem - ScriptBlock {Set-MpPreference - DisableBehaviorMonitoring $false - Verbose;Set-MpPreference - ScanScheduleDay 1 - Verbose;Set-MpPreference - ScanScheduleTime 05 :00 :00 - Verbose}
10+ }
11+
12+
13+ Invoke-Command - ComputerName NLGDVJAMVM1 - ScriptBlock {Get-MpPreference }
14+
15+ Get-WmiObject - Namespace " root\Microsoft\SecurityClient" AntimalwareHealthStatus
16+
17+
18+ mpcmdrun - getfiles # Gets all the defender related logs
You can’t perform that action at this time.
0 commit comments