Post

Visualizzazione dei post con l'etichetta alert

Teams Incoming Webhook deprecated: Use PowerAutomate - Workflow

Since is not possible configure Classic Teams Webhook (deprecated, and it does not work from teams gui), I just created a workflow for "Gatus" monitoring application.  goto: https://make.powerautomate.com/ go to My flows > New flow > instant cloud flow     select "When a Teams webhook request is received" > create               configure: "Who can trigger the flow" > anyone add an action, search for:            post message in a chat or channel          configure:               "post as": flow bot               "post in": channel               "team": dropdown select team               "channel": dropdown select channel               "content":  Content: @...

Reboot is needed, check registry key value with Powershell and send email

 # the script is scheduled every morning at 9:00, by calling  #powershell -executionpolicy Bypass -File \\AD-DOMAIN-FQDN-OR-NETBIOS\sysvol\DOMAIN\scripts\SCRIPT.PS1 # $rebootcheck = Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -Name RebootCheckRequired if ($rebootcheck.RebootCheckRequired -eq 1) { write-output "reboot needed" $mailfrom = "email@email.com" $mailto = "email@email.com" $mailserver = "SmtpSERVER.email.com" $mailusername = "domain\username" $subject = "$(hostname) need reboot for updates" $body = "reboot asap" [System.Net.ServicePointManager]::SecurityProtocol = 'Tls,TLS11,TLS12' $getpw = ConvertTo-SecureString 'PLAINTEXTPASSWORD' -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential($mailusername, $getpw) [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { return $t...

Restic backup script simple (fresco fresco callo callo)

  ### backupscript.sh export RESTIC_REPOSITORY=sftp:administrator@172.16.7.1:/e:/resticroot ##this is a windows sftp server export RESTIC_PASSWORD=passwordstring restic --verbose backup /srv if [ $? -ne 0 ] then   sed -i '1s/^/Subject: restic error\n/' /root/restic_jobs/transcript.log   cat /root/restic_jobs/transcript.log | ssmtp -vvv email@provider.com fi restic --verbose forget --keep-last 2 --prune         if [ $? -ne 0 ] then sed -i '1s/^/Subject: restic error\n/' /root/restic_jobs/transcript.log cat /root/restic_jobs/transcript.log | ssmtp -vvv email@provider.com fi #### ssmtp.conf # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=postmaster # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com #mailhub=mail # Where will the mail seem to come from? #rewriteDomain= #...