Download featured YARA rules, browse code samples or contribute your own scripts
Most views
Last month I created a topic for a script I had created using Veeam Service Provider Console API to automate the upgrade of Veeam Agents (Automate Veeam Agent Upgrades via VSPC | Veeam Community Resource Hub) which also got featured in the last recap of 2023 which was a very nice end to the year for my first post! I was already planning on working on a script to automate the process of bulk updating VBR servers, but after it was mentioned a couple of times, I thought I would share what I have so far. If, like me, you work for an MSP, we have multiple tenant VBR’s kicking around it can be very time consuming when a new upgrade for Veeam comes out, to get this deployed on all of our tenants servers. Luckily, in recent updates, VSPC has improved the process of remotely upgrading VBR via VSPC. However, it is still a manual process that can still be time consuming going through each tenant VBR Server one by one. I wanted to find a way to automate this process.I could of wrote a script that
Creating many backup jobs for new environment or new project which has many VMs, it’s boring in addition you may make a mistake because of repeating.To avoid that you can use scripts to create them simultaneously and only change the value for some variables.Below script is for creating VMware VM backup job with almost all required options (VM selection, repo, proxy, retention , GFS, schedule , retries ….etc) moreover the recommended Advanced settings for Dell Data Domain repository.You can also use part of script to edit or modify existing backup jobs simultaneously.{{#Specify the name you want to assign to the backup job$JobName = "backup job name" #Specify the array of VMware VMs you want to add to the job.#If you want to search by part of VM name use *$VMsNames = Find-VBRViEntity -Name "VM1", "VM2", "VM3" #Specify the backup repository where the created backup will be stored. Default: default backup repository#If you want to search by part of repo name use *$BackupRepo = Get-VBRBack
I was wondering if there is a way to use PowerShell to determine if a machine in a protection group has not backed up in the last 30 days. Obviously in Inventory there are protection groups that have machines in them and a status of “Last Agent Backup”. Is it possible to generate a report that displays that information? Basically I would like to put the script into task scheduler and have it run the 2nd and the 24th of every month. Any advice? # Load Veeam PowerShell ModuleImport-Module Veeam.Backup.PowerShell# Define protection group names$protectionGroupNames = @("Example Protection Group", "Example Protection Group 2")# Get the current date and time window$timeWindow = (Get-Date).AddDays(-30)# Initialize array to store report data$reportData = @()foreach ($groupName in $protectionGroupNames) { # Get the protection group $protectionGroup = Get-VBRProtectionGroup -Name $groupName # Get details of the machines in the protection group $machines = Get-VBRDiscoveredComputer -P
Hi, all I made a simple script that will allow you to run the backup validator and receive a report. echocd C:\Program Files\Veeam\Backup and Replication\BackupVeeam.Backup.Validator.exe /backup:"BackupName" /report:"C:\VeeamReports"rem May have to specify name(s) of VMs being backed up in jobrem If there are multiple backup jobs, you must create a new line for each job --> Veeam.Backup.Validator.exe /backup:"BackupName" /report:"C:\VeeamReports"
Hey all,Again, hope it’s not spam, but wanted to share some custom code that came up for the purpose of a case and let the community have it also (since why not?)Issue:You want to have an inventory of Current Tape Locations Library Association Other Tape Elements There isn’t really a “nice” VeeamOne report for this (vOne just reports on Vaulted Tapes), and checking the tape WebUI isn’t always convenient nor is checking the Veeam Tape node.If you find a need for this, check this out:using namespace System.Collections.Genericfunction Get-VBRTapesInLibrary { param( [Veeam.Backup.PowerShell.Infos.VBRTapeLibrary[]]$Library ) $TapesInLibrary = Get-VBRTapeMedium | Where-Object {$_.LibraryID -eq $Library.id} return $TapesInLibrary}function New-TapeLocationPropertiesObject { param( [Veeam.Backup.PowerShell.Infos.VBRTapeMedium[]]$tapemedium ) $TapeBarcode = $tapemedium.Barcode $TapeName = $tapemedium.Name $TapeLocation = $tapemedium.Location.Type if($tapemedium.Location.Type -eq "Drive"){
IntroYou know the stories: Sometimes an incorrect keyboard layout can lead to incorrect entries. Or while coding, , you must make sure that you use the correct special characters such as ' or ", etc. But let's focus on the main topic - Veeam ONE AlertsVeeam ONE Alert - Suspicious incremental backup sizeYou probably know this Veeam ONE Alert: Veeam ONE Alert - Suspicious incremental backup size. What many may not know is that you can configure Veeam ONE to perform remediation actions when alerts are triggered. These actions can be performed automatically or after manual approval.Veeam ONE offers the following types of remediation for alarms:Predefined actions that are configured for the most commonly used out-of-the-box alarms. Custom scripts that you can specify in the settings of any alarm. For each severity level, Veeam ONE can run one or more custom scripts.For the Suspicious incremental backup size alert we do have a predefined action available: Predefined RemediationA SureBackup
WARNING: Exciting content 🕺🏻This blog post has a little bit of everything: A little bit of compliance, a little bit of encryption, a little bit of REST API, and a little bit of V13, like in this song.IntroductionThe EU’s Digital Operational Resilience Act (DORA) requires financial entities to protect their data using robust cryptographic methods. Two key articles, Article 6 (Encryption and Cryptographic Controls) and Article 7 (Cryptographic Key Management), set out what must be done. If you use Veeam for backups, you can meet many of these requirements.DORA - Summary of Relevant Requirements (Articles 6 & 7)DORA requires financial organizations to encrypt backup data at rest and during transfer. Connections within the organization and with external partners must also be protected using encryption. In addition, there must be clear rules for managing cryptographic keys throughout their entire lifecycle, including creation, storage, renewal, backup, and secure destruction. If a key
Looking for backup report script to output to html. Currently not veaam one in the environment.
Hi all, I’ve been toying around with the idea of a cli tool that works with everything and is related to the other post I put up today on the Go-Veeam-Auth that does authentication for all Veeam APIs. Anyway, I’ve come up with vcli a simple terminal app written in Go, allowing you to switch between APIs with minimal effort quickly. All the authentication is set up, so all you need to do is set some environmental variables, and off you go (no pun intended).The main output is JSON, but you can switch it over to YAML via a --yaml switch.The tool only does GET requests at the moment, as I wanted to gauge the interest before committing any more time to the project. Where the power really comes in when it is coupled with “nushell” which is a data-centric approach to shells. It makes manipulating json response objects a breeze and also allows conversion to other data formats. It also has a whole module system which I go into a bit on my GitHub. GitHub page: https://github.com/shapedthought/vc
With Veeam Backup & Replication (VBR) 12.1 it is possible to restore the Configuration Database using Powershell. Basically a simple task, if there weren't a few things to consider. Challenge accepted!My SetupLet's prepare for the scenario where the primary VBR is no longer available and the configuration database needs to be restored on another system with a different hostname (standby VBR). On the primary VBR, the configuration backup was encrypted according to the best practices and MFA was also activated for part of the users. The configuration database runs on PostgreSQL.I had the following thoughts before creating the scriptCheck that only the necessary Veeam services are running on the standby VBR server Check if the response file has the proper entries (e. g. not automatically starting the Veeam services after the restore) When MFA is enabled/used, updates must currently be made to the database after restoring the configuration DB (see here) The encryption password should n
Hello everyone, today I bring you one more step on how to correctly secure our instance of Veeam Backup for AWS v2.To do this we will rely on Let’s Encrypt, the famous open-source project that allows us to generate free SSL certificates.NOTE: This process is not officially supported by Veeam, and any consequence of following the steps incorrectly, or any incidence derived from these steps will leave us without support. We will have to deploy the appliance again, keep that in mind!Where shall I run this Script?My recommendation will be to run it from a Linux VM, Container, or similar that you have already on your on-prem, or in the Cloud. As a last alternative, not supported of course, is to follow these steps inside the Veeam Backup for AWS appliance itself.Installation of system requirementsTo make it all work we’re going to need a couple of packages to do all this automatically:jq The necessary Let’s Encrypt packagesTo install jq, we will launch the following command:sudo apt-get ins
Spring is here 💐 and with it comes another script. This time for Veeam Backup & Replication.The script shows different job configuration settings and can be used to quickly identify differences in job settings.The Readme and code lines can be found in GitHub:Bits & BytesMore to come depending on your feedback (I already got one related to NAS backup)
Hello, This is a script to audit VBM365. Feel free to say what you would like if it’s missing :) I know it’s not “complete” # =======================================================# NAME: VBM365audit.ps1# AUTHOR: Commenge Damien, Axians Cloud Builder# DATE: 11/07/2022## VERSION 1.0# COMMENTS: This script is created to Audit Veeam backup for microsoft 365# <N/A> is used for not available# =======================================================$date = (get-date -Format "dd_MM_yyyy_HH_mm")#Create directoryNew-Item -ItemType Directory -Path "C:\temp\VBM365Audit\$date" -Force | Out-Null#ReportPath$ReportPath="C:\temp\VBM365Audit\$date"#Report file HTML path$htmlReportPath = "$ReportPath\VeeamBackupMicrosoft365.html"$HTMLCSS = @'<style>body{color:black;font-family:Vinci Sans Light;font-size:0.79em;line-height:1.25;margin:5;}a{color:black;}H1{color:white;font-family:Verdana;font-weight:bold;font-size:20pt;margin-bottom:50px;margin-top:40px;text-align:center;background-color:#005E
Hey, Don’t know about you guys but I feel Veeam are missing what could be a very successful trick here with their SureBackup and Pre/Post Processing script functionalities. I know we have VeeamHub for some PowerShell scripts but I think to really push the value of Veeam integrating into our customers’ enterprise application stacks it would be great to have a more direct interface of getting scripts into Veeam. I’ve seen plenty of systems integrating “stores” or other web fronts to enable simple access. It’d be great to see ways of integrating with systems that have been seen as “traditionally” unfriendly to snapshoting and also to validate more complex workloads.I’m sure there are plenty of great scripts out there that just aren’t being shared due to lack of visibility of the existing platforms but driving it into the client would really improve feature take up. That’s my opinion anyway, how do you all feel about this? Wouldn’t you like vendors to be able to offer a one click “it just
Hey All,I’ve tried to get some automation for the backup of my Citrix base images. I have a script that adds a machine to the backup job based on the name. Of course, these machines get created and deleted like flies, and I was wanting to automatically remove them if they’ve been removed from vCenter. I guess I could use tags, but then I’d have to rely on my Citrix admin to use the tags, and if it’s forgotten then there’s no backup, so I’ve decided a script is the way to go. So adding machines to the jobs works wonderfully, but I can’t seem to nail the way to remove the machines that aren’t in vCenter inventory. I also have the auto delete from backups turned on to prune the base images after x days. Here’s the snippet of powershell causing issues:#Searches the backup job to find any VM that don't have a size associated with the VM and assigns it to the variable ie. VM is still in the job but the VM is deleted.$NullVM = Get-VBRJobObject -job $Citrixbackupjob | Where-Object -Prope
#Requires -Version 7#Requires -Modules PSSendGrid<#.Synopsis Generates report of relevant data on all customers known to a given Veeam Service Provider Console Server. Uses the new v3 API so your milage may vary..Notes Version: 0.6 Author: Jim Jones Modified Date: 8/21/2020 If running for the first time a new computer You will need to run to store the credentials $credpath='c:\creds\myadmincred.xml' GET-CREDENTIAL –Credential (Get-Credential) | EXPORT-CLIXML $credpath.EXAMPLE .\vspcCompanyReport.ps1 -vacServer 'vac.mydomain.com' -authPath 'c:\creds\myadmincred.xml'#>[CmdletBinding()]Param ( [string]$vacServer = "vac.mydomain.com", [string]$authPath = 'c:\creds\myadmincred.xml')#Email Variables$date = Get-Date$sgToken = "SendGridToken"$fromAddress = "myvac@mydomain.com"$fromName = "US VAC"$toName = "NetOps"$toAddress = "me@me.com"$emailBody = "See attached Company Backup Resource Report for $date"$Credentials = IMPORT-CLIXML
<#.Synopsis Generates report of all repositories known to a given Veeam Service Provider Console Server. Uses the new v3 API so your milage may vary..Notes Version: 1.0 Author: Jim Jones Modified Date: 8/21/2020 If running for the first time a new computer You will need to run to store the credentials $credpath='c:\creds\myadmincred.xml' GET-CREDENTIAL –Credential (Get-Credential) | EXPORT-CLIXML $credpath.EXAMPLE .\VACStorageReport.ps1 -vacServer 'vac.mydomain.com' -authPath 'c:\creds\myadmincred.xml'#>[CmdletBinding()]Param ( [string]$vacserver = "vac.mydomain.com", [string]$authpath = "c:\creds\myadmincred.xml")#Email Variables$date = Get-Date$sgToken = "SendGridToken"$fromAddress = "myvac@mydomain.com"$fromName = "US VAC"$toName = "NetOps"$toAddress = "me@me.com"$emailBody = "See attached VSPC Repository Usage Report for $date"$emailSubject = "VSPC Repository Usage Report for $date"$Credentials = IMPORT-CLIXML -path $a
I’m happy to announce that the storage report script, by @Jim Jones, has been updated for Veeam Service Provider Console v8 and is now available on VeeamHub.This script will return usage and metadata for all backup repositories for the specified VSPC server. It will also provide the name and UID of the provider/reseller/company to whom the repository belongs.Be on the lookout for the BackupSizeGB metric which was added in Veeam Service Provider Console v8. This metric is the total size of all restore points and is a useful chargeback metric for service providers.On top of that, this report could be used by operations to see the current status of all backup repositories in their environment.For more detailed information, please follow the VeeamHub link.https://github.com/VeeamHub/powershell/tree/master/VSPC-StorageReport
Hello Veeam,In Veeam 365 backup for SharePoint online, I see that can backup the SP online sites and also has a category for “Personal Sites”.Can anyone explain what is these Personal Sites and where can I find them in SharePoint admin portal?I couldn't found any explanation even in Veeam documentation about Personal Sites.https://helpcenter.veeam.com/docs/vbo365/guide/back_up_sites.html?zoom_highlight=personal+sites&ver=60 Thank you in advance,Nikos
Hello. We have a policy to export all tapes currently in a library that are marked FULL. I can get a list of all FULL tapes in a media pool like this:[String] $LibraryName = Get-VBRTapeLibrary | Select -Expandproperty Name$TapesToBeEjected = Get-VBRTapeMedium -Library $LibraryName | Where {$_.IsFull -eq "TRUE"} | Select Name, LastWriteTime, MediaPoolID | Sort -Property Name (there’s more to my script, but that is the relevant querying section) However, that gives me *all* tapes in the pool that are FULL, and I want only the tapes in a pool that are currently ONLINE in a library that are FULL (so it can send an email to the tape operators and tell them to go export the tape(s)). And I have not found a way to do that - I don’t see any property that is returned that shows ONLINE or OFFLINE of a specific tape. Am I just missing it? Is there way to query for this, so I can send an alert email (as a scheduled task)? Or is there some other way to do it? (we don’t have a license fo
How to get the start and end time of the last SQL log backup session?I just got this question from one of my customers and it’s not soo easy to get there, so I thought it might be useful to share a basic example. You’ll have to get the working task session and read & parse the logs for more details. $sql_base_job = "My SQL Server Job"$j = Get-VBRJob -Name $sql_base_job$SQLJob = $j.FindChildSqlLogBackupJob()$session = $SQLJob.FindLastSession()# Tasksessions will be per machine, I only have one$taskSession = Get-VBRTaskSession -Session $session$logBackupLogs = $taskSession.Logger.GetLog().UpdatedRecords$lastSessionStartLog = $logBackupLogs | ? { $_.Title.Contains("New transaction log backup interval started") } | Select -Last 1$lastSessionEndLog = $logBackupLogs | ? { $_.Title.Contains("Transaction log backup completed") } | Select -Last 1# Sanity check (Endtime > Starttime) might be good if a session was started but not yet finishedWrite-Output "Last log session start: " $lastSes
One of the first scripts I wrote after I joined Veeam was one that produced a license usage report using the Veeam Availability Console API. Since then, a lot has changed! The product was rebranded to Veeam Service Provider Console (VSPC) and it’s API was greatly updated in a complete rewrite!That change occurred a couple years ago... As such, it was definitely long overdue for this script to be reworked so it could leverage this amazing new API! This script uses minimal API calls to retrieve current point in time license usage for every company in VSPC. On top of that, if the company is managed by a reseller, reseller information will be included in the output.Developer’s notes...This script is meant to be a stepping stone as the framework can easily be used in other automations. I tried to keep most of the code modular by design so folks can use the script as-is or take the pieces you need for your custom Veeam integration. It can also serve as a reference on how to use Asynchronous
Guys, I've created a script to automatically create SPO and Teams jobs. Main features includeCreate jobs for all currently unprotected SPO sites and teams Build jobs based on a object-limit per job (incl. recurse option to cope with SP subsites) Distribute jobs over different repositories automatically (which includes proxy balancing of course) Add matching teams to the same job as the SP site as per BP Automatic scheduling with delays per job (configurable) All built on the VB365 API - so no M365 application or so required Include & excludes possible Can put objects in a job pointing to a repository which already contains backups of this objectThe script is available on VeeamHub: powershell/VB365-JobManager at master · VeeamHub/powershell (github.com) I already have two larger customers using versions of this script and am looking for more feedback of course.
Does anyone have a script and willing to share that list the Veeam backup job name + it’s start time+ the proxy server name+ it’s repository name.
Hello,I could say better late than never, i’m using a script since many years to make my configuration configuration immutable on a linux repos.Even it is now available for object storage and it will probably be immutable in future release, i think it could useful to share it. #!/bin/bash# Define a list of target directoriestarget_directories=("/path/to/your/target_directory1" "/path/to/your/target_directory2")attribute_to_apply=" +i" # The chattr attribute to apply (e.g., immutable)time_to_wait_days=10 # Time to wait in days before removing chattr attributelog_path="/path/to/your/logfile.log" # Replace with your desired log path# Calculate the time to wait in secondstime_to_wait_seconds=$((time_to_wait_days * 24 * 60 * 60))# Log the start timeecho "$(date): Chattr attribute application started for files in ${target_directories[*]}" >> $log_path# Loop through all target directoriesfor target_directory in "${target_directories[@]}"; do # Loop through all files in the target dir
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.