From d310bf8bbf7fa32c5172995c2aa54444bfa8a235 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Thu, 14 Jan 2021 01:17:58 +0000 Subject: [PATCH] add community scripts from dinger #242 --- .../scripts/community_scripts.json | 77 +++++++++++++++++++ scripts/{RDP enable.bat => RDP_enable.bat} | 0 scripts/WinDefenderAllowedApps.ps1 | 42 ---------- ...astStartup.bat => disable_FastStartup.bat} | 0 scripts/dnscheck.ps1 | 58 -------------- scripts/manuallyreinstallmesh.bat | 3 - scripts/updatetacticalexclusion.ps1 | 1 + 7 files changed, 78 insertions(+), 103 deletions(-) rename scripts/{RDP enable.bat => RDP_enable.bat} (100%) delete mode 100644 scripts/WinDefenderAllowedApps.ps1 rename scripts/{disable FastStartup.bat => disable_FastStartup.bat} (100%) delete mode 100644 scripts/dnscheck.ps1 delete mode 100644 scripts/manuallyreinstallmesh.bat diff --git a/api/tacticalrmm/scripts/community_scripts.json b/api/tacticalrmm/scripts/community_scripts.json index ed6360d9..05d309a9 100644 --- a/api/tacticalrmm/scripts/community_scripts.json +++ b/api/tacticalrmm/scripts/community_scripts.json @@ -117,5 +117,82 @@ "name": "Windows 10 Upgrade", "description": "Forces an upgrade to the latest release of Windows 10.", "shell": "powershell" + }, + { + "filename": "DiskStatus.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Check Disks", + "description": "Checks local disks for errors reported in event viewer within the last 24 hours", + "shell": "powershell" + }, + { + "filename": "DuplicatiStatus.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Check Duplicati", + "description": "Checks Duplicati Backup is running properly over the last 24 hours", + "shell": "powershell" + }, + { + "filename": "EnableDefender.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Enable Windows Defender", + "description": "Enables Windows Defender and sets preferences", + "shell": "powershell" + }, + { + "filename": "OpenSSHServerInstall.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Install SSH", + "description": "Installs and enabled OpenSSH Server", + "shell": "powershell" + }, + { + "filename": "RDP_enable.bat", + "submittedBy": "https://github.com/dinger1986", + "name": "Enable RDP", + "description": "Enables RDP", + "shell": "cmd" + }, + { + "filename": "Speedtest.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "PS Speed Test", + "description": "Powershell speed test (win 10 or server2016+)", + "shell": "powershell" + }, + { + "filename": "SyncTime.bat", + "submittedBy": "https://github.com/dinger1986", + "name": "Sync DC Time", + "description": "Syncs time with domain controller", + "shell": "cmd" + }, + { + "filename": "WinDefenderClearLogs.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Clear Defender Logs", + "description": "Clears Windows Defender Logs", + "shell": "powershell" + }, + { + "filename": "WinDefenderStatus.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "Defender Status", + "description": "This will check for Malware, Antispyware, that Windows Defender is Healthy, last scan etc within the last 24 hours", + "shell": "powershell" + }, + { + "filename": "disable_FastStartup.bat", + "submittedBy": "https://github.com/dinger1986", + "name": "Disable Fast Startup", + "description": "Disables Faststartup on Windows 10", + "shell": "cmd" + }, + { + "filename": "updatetacticalexclusion.ps1", + "submittedBy": "https://github.com/dinger1986", + "name": "TRMM Defender Exclusions", + "description": "Windows Defender Exclusions for Tactical RMM", + "shell": "cmd" } ] \ No newline at end of file diff --git a/scripts/RDP enable.bat b/scripts/RDP_enable.bat similarity index 100% rename from scripts/RDP enable.bat rename to scripts/RDP_enable.bat diff --git a/scripts/WinDefenderAllowedApps.ps1 b/scripts/WinDefenderAllowedApps.ps1 deleted file mode 100644 index 2dd22005..00000000 --- a/scripts/WinDefenderAllowedApps.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -# Allows the following Apps access as they are allowed on our system - -# Misc Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\PeaZip\peazip.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Nitro\Pro 11\NitroPDF.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\PROGRA~1\Nitro\PRO11~1\NitroPDF" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\ShareX\ShareX.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "Acrobat.exe" - -# Windows Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Windows\System32\mstsc.exe" - -# Tactical RMM Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Mesh Agent\MeshAgent.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\TacticalAgent\tacticalrmm.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\TacticalAgent\meshagent.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\salt\bin\python.exe" - -# Technical Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD 2020\acad.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2020\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2019\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2018\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2017\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2016\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\AutoCAD LT 2015\acadlt.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Tekla\Structural\Tedds\Tedds.exe" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Autodesk\Revit 2019\Revit.exe" - -# Finance Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Sage\Accounts\SBDDesktop.exe" - -# Office Apps -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\Office15\WINWORD.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\root\Office16\PUBLISHER.EXE" -Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files (x86)\Microsoft Office\root\Office16\ONENOTE.EXE" diff --git a/scripts/disable FastStartup.bat b/scripts/disable_FastStartup.bat similarity index 100% rename from scripts/disable FastStartup.bat rename to scripts/disable_FastStartup.bat diff --git a/scripts/dnscheck.ps1 b/scripts/dnscheck.ps1 deleted file mode 100644 index 4e535b8a..00000000 --- a/scripts/dnscheck.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -## names of hostname to run DNS checks against please leave the name in brackets -$hostname = 'bbc.com' - -## allowed time for DNS check to be done (Milliseconds) -$time = 100 - -write-Output -NoNewLine "Verifying" $hostname " ... " - -## Do a ping test to ensure hostname can be contacted - -if (Test-Connection $hostname -Count 1 -ErrorAction SilentlyContinue) - { - write-Output "Ping test passed for $hostname" - } -else - { - write-Output "Ping Test Failed for $hostname" - exit 1 - } - -## Test if the DNS record exists or not - -try - { - $dnscheck = [System.Net.DNS]::GetHostByName($hostname) - $test = $true - } -catch - { - Write-Output "Unable to resolve DNS for $hostname" - exit 1 - } - -## Do some verification if DNS record exists - -if($test) - { - -## Check time taken in Milliseconds to resolve hostname - - $start_time = Get-Date - nslookup $hostname - $timetaken = $((Get-Date).Subtract($start_time).Milliseconds) - Write-Output "Time taken: $timetaken Milliseconds" -if ($timetaken -ge $time) - { - write-Output "DNS lookup for $hostname took longer than $time Milliseconds" - exit 1 - } - else - { - Write-Output "Everything appears fine with your DNS for $hostname" - exit 0 - } - } - - -Exit $LASTEXITCODE diff --git a/scripts/manuallyreinstallmesh.bat b/scripts/manuallyreinstallmesh.bat deleted file mode 100644 index 13387e4a..00000000 --- a/scripts/manuallyreinstallmesh.bat +++ /dev/null @@ -1,3 +0,0 @@ -taskkill /IM "meshagent.exe" /F -"C:\Program Files\Mesh Agent\MeshAgent.exe" -fulluninstall -"C:\Program Files\TacticalAgent\MeshAgent.exe" -fullinstall diff --git a/scripts/updatetacticalexclusion.ps1 b/scripts/updatetacticalexclusion.ps1 index a91cef9d..be6d3fde 100644 --- a/scripts/updatetacticalexclusion.ps1 +++ b/scripts/updatetacticalexclusion.ps1 @@ -2,3 +2,4 @@ Add-MpPreference -ExclusionPath 'C:\Program Files\TacticalAgent\*' Add-MpPreference -ExclusionPath 'C:\Windows\Temp\winagent-v*.exe' Add-MpPreference -ExclusionPath 'C:\Program Files\Mesh Agent\*' +Add-MpPreference -ExclusionPath 'C:\salt\*'