PowerShell – Scan Text File for String

Code.ps1   # MrNetTek # eddiejackson.net # 1/13/2022 # free for public use # free to claim as your own $Path = “C:\PowerShell\test.txt” $Content = (Get-Content -Path $Path | Select-String -Pattern ‘Eddie-PC’).Matches.Success if ($Content) { #ADD MORE CODE HERE Write-Host “Eddie-PC found!” Write-host “exiting…” Start-Sleep 3 Exit } else { #ADD MORE CODE HERE Write-Host Read More …

PowerShell – Enabling All Notifications (Azure and Desktops)

Code.ps1   # MrNetTek # eddiejackson.net # 1/10/2022 # free for public use # free to claim as your own Clear-Host # GLOBAL # SET LOCAL MACHINE KEYS cmd /c “reg add “”HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications”” /v DisableNotifications /t REG_DWORD /d 0 /f /reg:64″ cmd /c “reg add “”HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications”” /v DisableEnhancedNotifications /t Read More …