Download featured YARA rules, browse code samples or contribute your own scripts
Recently active
We’ve updated the Script Library section to include YARA rules. I’ve made a quick video (sorry for the cheesy graphics...) on how to install a YARA rule from this site and perform your first scan!
Welcome to the YARA and Script Library! This area of the community hub will provide community driven scripts and YARA rules, with selected featured items. Veeam Data Platform 23H2 includes Veeam Backup & Replication v12.1 which includes YARA Scanning. This area of the Veeam Community Hub will offer featured YARA rules for use. Custom script troubleshooting is not supported. What's in Scope:Confirming that Veeam Backup & Replication recognized the YARA rule file.What's Out of Scope:Troubleshooting why a custom YARA rule did not function as intended.This area also includes scripts in the Script Library. Generally speaking, scripts are licensed to you by the sample's author and fall under your responsibility and is governed by the Veeam Customer Support Policy. The figure below summarizes the scripting support for PowerShell:Excerpt from KB2183: PowerShell Script Execution Troubleshooting Advice (veeam.com)
If you do not run VeeamONE, it can be challenging to check if every VM that should be backed up, is really backed up. Therefore I wrote a small PowerShell script. Basically this script looks for each VM if there is a restore point for this VM. If not, it gets listed. Extra feature: Script connects to every vCenter that is registered in B&R server. There is a Blocklist included: when VMs should not be backuped, just place their name in the blocklist and they will not be shown in the list. So you can exclude VMs without editing the script.Notes:CredObject.xml is used for stored, encrypted credentials. Script connects to local B&R server, so it should run there if not changed. # Load Plugin and moduleAdd-PSSnapin VeeamPSSnapinImport-Module VMware.VimAutomation.Core# Configure for multiple vCenter ConnectionsSet-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope Session -Confirm:$falseSet-PowerCLIConfiguration -InvalidCertificateAction Ignore -Scope Session -Confirm:$false#
Recently I had to troubleshoot a Veeam Backup & Replication (B&R) problem. There the question popped up which are the running Veeam jobs at point or period of time. The GUI is not a big help to answer this question. Therefore I wrote a small script that show these jobs.The following PowerShell script snippet is quite simple. First, start- (tStart) and end-date/time (tEnd) are asked for input. The following query selects all running Veeam jobs at point or period of time that matches input dates.# Ask for start- and end-date and timeWrite-Host "Enter date in format " ($(get-date).ToString("dd.MM.yyyy HH:mm"))$tStart = Read-Host "Enter start-time (Enter for now)"$tEnd = Read-Host "Enter end-time (Enter for equal to start-time)"if ($tStart -eq '') {$tStart = get-date -Format "dd.MM.yyyy HH:mm"}if ($tEnd -eq '') {$tEnd = $tStart}# Check input datatry {$tStart = [DateTime]::Parse($tStart)}catch {Write-Host "start-time wrong input"; continue}try {$tEnd = [DateTime]::Parse($tEnd)}cat
Hello, we are monitoring the customer backups via PRTG.Till now, we had a SQL Skript, wich got the latest result and reported it to PRTG:SELECT latest_result FROM bjobs WHERE name = @prtg;That worked fine with MSSQL Express, but now with PostgreSQL we have to use a PostgreSQL Sensor in PRTG. Thats no problem, but it always failes with: “GSS/SSPI authentication but IntegratedSecurity not enabled” when I try to use the postgres user, or with: 28000: SSPI-Authentication for user Administrator failed”. For debugging I tried to change the access settings in the pg_hba.conf file but nothing seems to work.Is there a way I can still run queries to the config database? Or do I have to go via the PowerShell Snappin from Veeam?PS: We don’t use the Enterprise Manager, because you need the Enterprise Plus license for that and our customers don’t have that license. Thanks alot.
This script showcases just how easy it is to use Veeam PowerShell cmdlets to export an M365 mailbox. This script is designed to be executed on a Veeam Backup for Microsoft 365 (VB365) v6 server and it's interactive so no parameters are required. Upon execution, the script polls for information which culminates in the specified user mailbox being exported to a PST file.The code in this script could also be referenced to create a script to fully automate the mailbox export process.For more detailed information, please follow the VeeamHub link:https://github.com/VeeamHub/powershell/tree/master/VB365-ExportMailboxToPSTHere’s a screenshot of what it looks like in action:
Now that V12.1 is available, I wanted to share with you a featured YARA rule set that can give you on-demand scanning for some top ransomware threats. Attached to this post is a file named: Top10RW_YARArules.zip. In this file are YARA rules for some common ransomware threats that have been seen recently:Attribution: This great collection was made by Felix Bilsten. Links: X: Felix Bilstein (@fxb_b) / X (twitter.com), website: Felix Bilstein - project overview (cocacoding.com) and Github: fxb-cocacoding (Felix Bilstein) · GitHub
Since the introduction of NAS backup capability with v10 of Veeam Backup & Replication there have been many requests for tape support. But as we all know, Veeam’s NAS backup doesn’t support tape (yet?), neither as a primary nor as secondary (backup copy or archive) target.With v11 we got the new feature called “instant file share recovery” which lets us publish file shares directly from the backups previously created with NAS backup jobs. My colleague Uwe Groening recently came up with the idea to use these shares, published by instant file share recovery, as a source for file to tape jobs within Veeam. This way, it should be possible to create tape copies directly from existing file share backups. This makes a huge difference to other solutions that involve either reading data from the production share again or staging a restore on some (extra) storage prior to using “file to tape” from there.We discussed this idea in more detail and created a process (for a single NAS backup job)
Doc Veeam validatorKB2086: How to Use the Veeam Backup ValidatorVeeam Backup Validator - Veeam Backup Guide for vSphere It is essential to verify the status of the backups at the CRC level on the storage and the possibility of restoring them via Surebackup.During the wizard for creating a backup job you can enable "Storage backup files healt check (detect and auto-heals corruption. https://helpcenter.veeam.com/docs/backup/vsphere/backup_health_check.html?ver=110I prefer to automate the validation process to have a detailed report every 2 weeksCopy past and save .ps1 format <#.SYNOPSIS Performs a validation of all server backups.DESCRIPTION .NOTES File Name : veeam_validator.ps1 Author : Me and my colleague Prerequisite : PowerShell V2 , VeeamPSSnapIn installed#>#------------------------------------------ VARIABLES TO CHANGE -------------------------$email_infoTO = "yourmail@yourdomain.com"$email_infoFrom = "$($env:COMPUTERNAME)@ yourdomain.com "$email_
Support for the newly released v12 (VBR/EM/ONE) is now available in the Veeam Collection for Ansible!What enhancements can you expect?Support for Windows Server 2022 Full support for PostgreSQL when performing VBR/EM installs Including local & remote DBs A new module to apply PostgreSQL performance tuning Leverages the Set-VBRPSQLDatabaseServerLimits PowerShell cmdlet Automatic enabling of the PostgreSQL pg_stat_statements extension during PostgreSQL installation This assists in performance troubleshooting Additional sample v12-specific playbooks Upgraded dependencies leveraging the latest ansible collections for Windows: ansible.windows: 1.13.0 community.windows: 1.12.0 For those not familiar with this Ansible collection, please see this blog post for an introduction.
Hi, Good evening.I am analyzing different Veeam Backup & Replication instances and I would like take all parameters for every backup job present on every VB&R instances that I am analyzing.I would like to know if is possible launch one powershell script for retrieve these values for example: start time for every schedule job, servers involved, backup modality (full, incremental, reverse incremental, etc) aware setting if exist, etc.Thanks in advance.Best regardsRicardo
One thing I’ve found as a Veeam customer is you often have to restart the VSS services on your SQL and other VSS aware servers. Here’s a script I wrote to do just that.# Name: Restart-VSS.ps1# Description: Restarts list of services in an array on VMs with a given vSphere tag. Helpful for Veeam B&R processing# For more info on Veeam VSS services that may cause failure see https://www.veeam.com/kb2041Import-Module VMware.PowerCLI$vcenter = "vcenter.domain.com"$services = @("SQLWriter","VSS")$tag = "myAwesomeTag"Connect-VIServer $vcenter$vms = Get-VM |where {$_.Tag -ne $tag}ForEach ($vm in $vms){ ForEach ($service in $services){ If (Get-Service -ComputerName $vm -Name $service -ErrorAction SilentlyContinue) { Write-Host $service "on computer" $vm "restarting now." Restart-Service -InputObject $(Get-Service -Computer $vm -Name $service); } }}
Hi all, I am looking for the way to manage the number of concurrent tasks on repository. Two questions regarding it.I was expecting it to be the option of CBackupRepository object but doesn’t seems so. So how to retrieve the current configured number? Whats the difference between LimitConcurrentJobs and MaxConcurrentJobs options in Set-VBRBackupRepository commandlet and which on is actually reflect the option in UI?Cheers,Alexey
Hello, As you may know I have been working for some time with several tools to document or diagram the Veeam Backup & Replica Infrastructure. In the latest version of Veeam.Diagrammer the ability to generate a diagram of the infrastructure has been added. Here is the link:https://techmyth.blog/posts/veeam-diagraming-infra/ Greetings from the Caribbean :)
Disclaimer: This is only provided as a reference. Make sure you understand what you are doing before executing this in your own setup (eg test in a lab). Since this is modifying the firewall, you might lock yourself out remotely if you are executing the steps incorrectly or you have a slightly different setupIf you are running RHEL or any experimental derivative (in my case Rocky 8.8), you can use firewalld to configure the firewall. Firewalld uses zones in which you can allow ports or services based on the incoming interface or IP sources. By default, all the traffic is “allowed” based on the rules in the public zone (or better the interfaces are by default assigned to the public zone). You can test this with# What is the default zonefirewall-cmd --get-default-zone# What are the active zones, by default only the public zonefirewall-cmd --get-active-zones# List all the rules in the public zone, this is by default ssh cockpit and dhcpv6firewall-cmd --zone=public --list-allYou can howeve
[CmdletBinding()]param ( # CSv file tab delimited with name and Vlan [Parameter(Mandatory = $true)] [string[]] $CSV, # The datacenter where you want to move the workload to. [Parameter(Mandatory = $true)] [string] $Datacenter, # The Cluster where you want to move the workload to. [Parameter(Mandatory = $true)] [string] $Cluster, # Errorlog [Parameter()] [string] $ErrorLog = 'E:\Scripts\ErrorLog.txt', # Enable error logging [Parameter()] [switch] $LogErrors, # Enable error logging [Parameter()] [Int32] $HostIndex = 0)#$Global:ErrorLog = 'E:\Scripts\ErrorLog.txt'function Write-ToLog { [cmdletbinding()] Param ( [string] [parameter(ValueFromPipeline)] $Text ) if ($LogErrors) { $timestamp = Get-Date Write-Output "$timestamp :: $Text" | Tee-Object $ErrorLog -Append }}function Move-Workload { <# .SYNOPSIS Performs a migration of VMs running on Hyper-V to
Hello together,before you update VEEAM to Version 12 using VMware vCenter/ESXi please check VMs HardDisks for duplicate UUID. In Version 11 this was never a problem. In the new Version VEEAM checks the UUID and backup will fail.VMware has no problem with that most time. But they know the Problem - https://kb.vmware.com/s/article/2006865This command will find any HardDisk with duplicate UUID - please note that this is VMware PowerCLI commandGet-VM | Get-HardDisk | Select @{N='VM';E={$_.Parent.Name}}, @{N='Uuid';E={$_.ExtensionData.Backing.Uuid}} | Group-Object -Property Uuid | ?{ $_.Count -gt 1 }As Service Provider such changes in VEEAM are a total disaster!!
[Array]$RepoList = Get-VBRBackupRepository | Where-Object {$_.Type -ne "SanSnapshotOnly"} [Array]$ScaleOuts = Get-VBRBackupRepository -ScaleOutif ($ScaleOuts) { foreach ($ScaleOut in $ScaleOuts) { $Extents = Get-VBRRepositoryExtent -Repository $ScaleOut foreach ($Extent in $Extents) { $RepoList = $RepoList + $Extent.repository } }}$RepoList | Select-Object Name, Path, `@{Name="CachedTotalSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedTotalSpace/1GB,2)}}, `@{Name="CachedFreeSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedFreeSpace/1GB,2)}} | Format-Table -AutoSize
Update Jan 13th - Latest version available on https://github.com/yetanothermightytool/powershell/tree/master/vbo/vbo-health-checker***It's always recommended to open a support case as soon you're facing an issue with Veeam Backup for Microsoft Office 365. But as systems engineers, we somehow always want to know what happens under the hood That's why I started writing a VBO Health Check script which quickly gives some useful information about the health of a Veeam Backup for Microsoft 365 setup. The script checks and reports possible issues/misconfigurations: - Backup Job Status per Job / Number of failed job - License expiration date - Check logs if throtthling occured on MS side - Possible slow backup due to slow backup repository - Proxy stuff (min. recommended CPU and Memory) - Check Windows event log for low memory conditions - Logfile with the findingsLogfile gets stored in “C:\Scripts\Veeam\vbo\vbo_healthcheck_<computername>.log”Note: The script is
Inherency:Since we bill by actual disk usage for our client utilizing CloudConnect, the existing reports are non-functional for reporting and billing (They report pre-deduplication/reflink data). It took a while to figure out, but there is a way to calculate actual disk space used on a per directory on an immutable repository.Solution:Using: https://community.veeam.com/blogs-and-podcasts-57/check-reflink-and-spared-space-on-xfs-repositories-244 I have extrapolated a script that will give the disk usage of each folder (IE: client) on an immutable repo. This isn't "Data used"; that is what Veeam reports. This is "Disk Used". The actual size on disk after reflinks (duplicated data is only counted once). A note about this script; it appears that the original blog entry is wrong on the size of a block. They attribute it to 4096... which is true... on disk... but the utility used explicitly gives the information in block sizes of 512:https://linux.die.net/man/8/xfs_bmap"units of 512-byt
Hello,I want to share with you the last script I make to get hardening configuration of the VBR server and then remediate some of them.The script need to be executed on the VBR server itself.It's built with Veeam 12.1 beta. That means some checks can break on GA version.I seperate it into 4 choices when you execute it :choice 1 = Apply Level 1 security (security check done by veeam product itself when you execute security and compliance on the VBR console)choice 2 = Apply Level 2 security (best practice about hardening Veeam product)choice 3 = Remove VBR console (Carreful, you can't use anymore Veeam powershell after this action)choice 4 = Get HTML security report That means choice 1 or 2 or 3 will performs modifications on the system.Choice 4 will not do any modifications, it just make the HTML report.Some sample available on fresh installation, fresh installation + L1 applied, fresh installation + L1 + L2 appliedIf you want to see report on fresh installation + after doing choice 1 +
As always run it on a test VM while you are watching it, but this script will power down, modify the CPU and/or Memory on a VM, then power it back up. This has been VERY handy for Changing resources on my VMs after hours. Like adding memory to a Veeam Virtual proxy server after a backup window ends. While I borrowed most of the script from the internet, there wasn’t much about running as a scheduled task which was can cause confusion to many people from what I read. Here is a few tips to run the PowerShell script as a scheduled task. Step 1, Use the script below to create a PS1 file. I named mine VM_MEMORY_CPU_COUNT_HQ.PS1 Keep in mind the name and location when you add the arguments below.Step 2, Create a scheduled task in windows at specified time. Step 3, set action to run a program. You don’t want to run the script, you want to run Powershell.exeexample - C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Step 4, Configure the options\arguments. I put 0 if I want no
Since I was tired to click roles together in vCenter server, I wrote a simple script on creating a vCenter role for Veeam with PowerCLI.This PowerShell / PowerCLI script lets you create a new vCenter server role with all the cumulative privileges and permissions to use them with Veeam Backup & Replication V10.The privileges used are based on the recommendations out of the Veeam Help Center which you can find here: Cumulative Permission for VMware vSphere – Veeam Help CenterSimply execute the script and follow the steps to fill in the relevant data like your vCenter server name, the username and your password. The script will then ask you to choose a name for your new role and automatically creates it. The script in actionThe script was successfully tested against:VMware vCenter 6.5 VMware vCenter 6.7 VMware vCenter 7.0You can read about this on my blog:https://www.virtualhome.blog/2020/04/22/creating-a-vcenter-role-for-veeam-with-powercli/The script is online at github: https://git
Hi thereI’ve been working on a module to make connecting to Veeam APIs a bit easier when using Python (yes I am a big fan).https://github.com/shapedthought/veeam-easy-connectComments, issues and pull requests welcome.Cheers, Ed
If you have Veeam on your domain, or Enterprise Manager and want to give a user access for a specific amount of time, you can achieve this with a simple PowerShell command. Add-ADGroupMember -Identity ‘Group_NAME’ -Members ‘Username’ -MemberTimeToLive (New-TimeSpan -Minutes *****) The issue with this is trying to calculate minutes to days, weeks, months, or having some sort of searchable way to do this task. Onboarding users with this method was proving difficult so I thought of easier ways to achieve this. What started off with an overly complex excel spreadsheet to extract minutes from dates and generate a command has now become an PowerShell based GUI. In the below script. anything with “*****” should be replaced with items from your own AD infrastructure. This allows to search 1 or many users and add them to 1 or many groups. If you select the TTL checkbox, you can select the end date when the users will be removed from the groups. The user and group names can be searched start
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.