This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Process openvpn* | kill -f; get-service openvpn* | set-Service -Status Stopped -StartupType disabled; start-process 'C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\Uninstall.exe' -ArgumentList '/S /qn' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the list | |
$list = Import-csv -path 'C:\Users\ADMIN\Downloads\file.csv' | |
# Define the script block: call PowerShell to allow the script. | |
$script = {powershell /executionpolicy bypass 'c:\temp\script.ps1'} | |
Foreach ($Comp in $list."asset.Name") { | |
# Test to see if machine is online before doing the work. | |
If (Test-Path \\$comp\c$\temp){ | |
Robocopy.exe C:\files\ \\$comp\c$\temp\ /MT /NP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use: ./log-to-discord.sh <LogFilePath> <DiscordWebHook> <LogKeyword> | |
tail -n0 -F "$1" | while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent -H "Content-Type:application/json" \ | |
--data "{\"content\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2"; | |
done |