Life is made from tiny annoyances

Code: Select all
$regBinary = (Get-Item 'HKLM:\SOFTWARE\VeeaM\Veeam Backup and Replication\license').GetValue('Lic1')
$veeamLicInfo = [xml]([string]::Join($null, ($regBinary | % { [char][int]$_; })) -replace ".*<[?]xml","<?xml")
$cparr = @()
$veeamLicInfo.Licenses | % { $_.License.InnerText } | % {
$text = $_.split("`n")
$expdate = ""
$product = ""
$text | ? { $_ -match "Support expiration date=(.*)" } | % {
$expdate = $matches[1]
}
$text | ? { $_ -match "Product=(.*)" } | % {
$product = $matches[1]
}
if ($product -ne "" -and $expdate -ne "") {
$cparr += ("{0} : {1}" -f $product,$expdate)
}
}
[string]::Join("`r`n",$cparr) | clip.exe
Support ID copy. By popular demand, we've enabled you to copy your Support ID from the License Information dialog into the Windows Clipboard.
Users browsing this forum: AdsBot [Google], Amazon [Bot], DanielJ, Google [Bot], tpayton and 64 guests