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
async download(event) { | |
event.preventDefault(); | |
console.log("Download function initiated"); | |
const spinner = document.querySelector('.downloadLoading'); // Show the spinner | |
spinner.classList.remove('hidden'); | |
const contentIds = this.selectedIds; | |
const csrfToken = document.querySelector("[name='csrf-token']").content; |
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
async download(event) { | |
event.preventDefault(); | |
console.log("Download function initiated"); | |
const spinner = document.querySelector('.downloadLoading'); // Show the spinner | |
spinner.classList.remove('hidden'); | |
const contentIds = this.selectedIds; | |
const csrfToken = document.querySelector("[name='csrf-token']").content; |
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
EventID,Source,LogName,EventType,Message,Severity | |
9,%,%,0,%did not respond within the timeout period%,High | |
11,%,%,0,%controller error%,High | |
1000,%Microsoft-Windows-DHCP-Server%,%,0,%The DHCP service received the unknown option%,Critical | |
1064,%Microsoft-Windows-DHCP-Server%,%,0,%There are no IP addresses available for BOOTP clients%,Critical | |
1069,%Microsoft-Windows-DHCP-Server%,%,0,%Iashlpr cannot contact the NPS service%,Critical | |
1070,%Microsoft-Windows-DHCP-Server%,%,0,%Iashlpr initialization failed%,Critical | |
1142,%Microsoft-Windows-DHCP-Server%,%,0,%The DHCP server is unable to reach the NPS server%,Critical | |
3,%Microsoft-Windows-DNS-Server-Service%,%,0,%The DNS server has shut down%,Critical | |
10,%Microsoft-Windows-DNS-Server-Service%,%,0,%The DNS server could not start because it is dependent on the NTDS service which is not started%,Critical |
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-Module $env:SyncroModule | |
########################################################################################### | |
# First, some functions, these are just declarations that get used lower down the script. # | |
########################################################################################### | |
function Query-Syncro-Tickets ($SyncroSubdomain,$SyncroAPIKey,$Query) { | |
$uri = "https://$SyncroSubdomain.syncromsp.com/api/v1/tickets?api_key=$SyncroAPIKey&query=$Query" | |
$response = Invoke-RestMethod -Uri $uri | |
$response |
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-Module $env:SyncroModule | |
# Silent Install CCleaner | |
# http://www.piriform.com/ccleaner/download | |
# Path for the workdir | |
$workdir = "c:\temp\" | |
$sixtyFourBit = Test-Path -Path "C:\Program Files (x86)" |
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-Module $env:SyncroModule | |
# this depends on bemcli being installed! | |
#Setting default CLI | |
import-module bemcli | |
#Getting Alerts | |
$Alerts = Get-BEAlert | |
#Looping through the alerts and setting them. |
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-Module $env:SyncroModule | |
# Create RMMAlerts when a backup fails | |
$event = Get-EventLog "Veeam Backup" -newest 1 -After (Get-Date).AddDays(-1)| Where-Object {$_.EventID -eq 0} | |
if($event.entrytype -eq "Error") { | |
write-host "We got an event that is an error from Veeam Backup!" | |
Rmm-Alert -Category "veeam_backup_failed" -Body "Veeam Backup Failed on $(%computername%) - message: $($event.message)" | |
} else { |
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
# Download the installer | |
$source = "https://rmm.syncromsp.com/GetThisURLfromYourCustomerDetailPageAndPutItHere.exe" | |
$destination = "C:\temp\syncro-installer.exe" | |
# Check if Invoke-Webrequest exists otherwise execute WebClient | |
if (Get-Command 'Invoke-Webrequest'){ | |
Invoke-WebRequest $source -OutFile $destination | |
} else { | |
$WebClient = New-Object System.Net.WebClient |
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
module Teamviewer | |
class Connector | |
attr_reader :client | |
def initialize | |
@client = connection(credentials) | |
end |
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
namespace :some_thingy do | |
task :my_big_fixer, [:production_run] => :environment do |t, args| | |
production_run = args[:production_run] == "true" | |
ap "doing a dry run" unless production_run | |
my_logger = Logger.new("#{Rails.root}/log/my_thingy.log") | |
require 'progress_bar' | |
bar = ProgressBar.new(User.all.count) # pass the total for the progress bar | |
my_logger.info "Starting at #{Time.now}" | |
NewerOlder