Skip to content

Instantly share code, notes, and snippets.

View Davidblkx's full-sized avatar

David Pires Davidblkx

View GitHub Profile
@Davidblkx
Davidblkx / windefender.ps1
Created July 21, 2021 08:03
Enable disable windows defender real time protection
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
$arguments = "& '" +$myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
$status = (-Not (Get-MpPreference).DisableRealtimeMonitoring)
Set-MpPreference -DisableRealtimeMonitoring $status
$status
@Davidblkx
Davidblkx / new_work_pc.ps1
Last active March 9, 2022 18:04
script install new pc
# login in windows store
######## install and reload ########
winget install scoop
winget install vscode
####################################
winget install Microsoft.WindowsTerminal
winget install cpu-z
winget install SlackTechnologies.Slack
winget install mozilla.firefox