Version 1.0 of Configure

This commit is contained in:
Madzone
2026-08-11 09:10:37 +02:00
parent cf1b29452d
commit 284fe02796
8 changed files with 376 additions and 0 deletions
@@ -0,0 +1,25 @@
Set-StrictMode -Version Latest
function Get-VMwareInventory {
param([Parameter(Mandatory)][string]$Server)
foreach($Name in @("Get-VBRServer", "Find-VBRViEntity")) {
if($null -eq (Get-Command $Name -ErrorAction SilentlyContinue)) {
throw "Veeam-Befehl nicht verfügbar: $Name"
}
}
$VBRServer = Get-VBRServer -Name $Server |
Where-Object { $_.Type -in @("VC", "ESXi", "ESX") } |
Select-Object -First 1
if($null -eq $VBRServer) {
throw "VMware-Server ist in Veeam nicht registriert: $Server"
}
@(Find-VBRViEntity -Server $VBRServer -VMsAndTemplates |
Where-Object { $_.Type -match "Vm" } |
Select-Object -ExpandProperty Name -Unique)
}
Export-ModuleMember -Function Get-VMwareInventory