Skip to content

Instantly share code, notes, and snippets.

@meoso
Last active January 16, 2025 16:12
Show Gist options
  • Save meoso/9a6ac5eb1d7ab7c72004065ffd7fa9b0 to your computer and use it in GitHub Desktop.
Save meoso/9a6ac5eb1d7ab7c72004065ffd7fa9b0 to your computer and use it in GitHub Desktop.
List some Veeam v13 deprecations
### List some Veeam v13 deprecations
clear;
Import-Module Veeam.Backup.PowerShell
Connect-VBRServer -Server localhost
# Get all Veeam jobs
$jobs = Get-VBRJob
Write-Host 'Jobs with retention type not set to "days":'
$jobsNotSetToDays = $jobs | Where-Object {
$_.JobType -eq "Backup" -and
$_.Options.BackupStorageOptions.RetentionType -ne "Days"
}
if ($jobsNotSetToDays) {
foreach ($job in $jobsNotSetToDays) {
Write-Host "Job Name: $($job.Name)"
Write-Host "Retention Type: $($job.Options.BackupStorageOptions.RetentionType)"
Write-Host "---"
}
} else {
write-host "None."
}
Write-Host 'Jobs with reversed incremental backup mode enabled:'
$reversedIncrementalJobs = $jobs | Where-Object {
$_.BackupTargetOptions.Algorithm -eq 'Reversed'
}
if ($reversedIncrementalJobs) {
$reversedIncrementalJobs | Select-Object Name, Id, @{
Name = 'BackupMode';
Expression = {$_.BackupTargetOptions.Algorithm}
}
} else {
write-host "None."
}
Write-Host 'Repositories where "Use per-machine backup files" is not enabled:'
$repositories = Get-VBRBackupRepository
$nonPerMachineRepos = $repositories | Where-Object { $_.Options.OneBackupFilePerVm -eq $false}
if ($nonPerMachineRepos) {
$nonPerMachineRepos | ForEach-Object {
$repo = $_
[PSCustomObject]@{
Name = $repo.Name
Path = $repo.Path
Type = $repo.Type
PerVmBackupEnabled = $repo.Options.OneBackupFilePerVm
}
} | Format-Table -AutoSize
} else {
write-host "None."
}
Disconnect-VBRServer
@meoso
Copy link
Author

meoso commented Jan 13, 2025

VMWare specific:
This may assist in comparing Guest OS Version setting versus actual running guest OS reported by vmware-tools:

Connect-VIServer vCenter
Get-VM | Sort-Object Name | Get-View -Property @("Name", "Config.GuestFullName", "Guest.GuestFullName") `
 | Select-Object -Property Name, @{N="Configured OS";E={$_.Config.GuestFullName}}, @{N="Running OS";E={$_.Guest.GuestFullName}}

optionally: | Export-CSV -Path "vm_guest_os_list.csv" -NoTypeInformation; if importing to google-sheets or similar, can edit fourth column with a formula such as =IF(B2<>C2, "not equal", "") and drag it down to populate the entirety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment