Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rschitz committed Nov 28, 2023
1 parent 8614c87 commit 5e066ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions opt/sexigraf/ViOfflineInventory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

param([Parameter (Mandatory=$true)] [string] $CredStore)

$ScriptVersion = "0.9.86"
$ScriptVersion = "0.9.87"

$ErrorActionPreference = "SilentlyContinue"
$WarningPreference = "SilentlyContinue"
Expand Down Expand Up @@ -364,10 +364,10 @@ if ($ViServersList.count -gt 0) {

if ($(Get-ChildItem "/mnt/wfs/inventory/ViVmInventory.*.csv")) {
Write-Host "$((Get-Date).ToString("o")) [INFO] Rotating ViVmInventory.*.csv files ..."
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViVmInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViVmInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property Name | ?{$_.SideIndicator -eq "<="}
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViVmInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViVmInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property FullName | ?{$_.SideIndicator -eq "<="}
If ($ExtraCsvFiles) {
try {
Get-ChildItem $ExtraCsvFiles.name | Remove-Item -Force -Confirm:$false
Get-ChildItem "/mnt/wfs/inventory/$($ExtraCsvFiles.name)" | Remove-Item -Force -Confirm:$false
} catch {
AltAndCatchFire "Cannot remove extra csv files"
}
Expand Down Expand Up @@ -411,7 +411,7 @@ if ($ViServersList.count -gt 0) {

if ($(Get-ChildItem "/mnt/wfs/inventory/ViEsxInventory.*.csv")) {
Write-Host "$((Get-Date).ToString("o")) [INFO] Rotating ViEsxInventory.*.csv files ..."
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViEsxInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViEsxInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property Name | ?{$_.SideIndicator -eq "<="}
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViEsxInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViEsxInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property FullName | ?{$_.SideIndicator -eq "<="}
If ($ExtraCsvFiles) {
try {
Get-ChildItem $ExtraCsvFiles.name | Remove-Item -Force -Confirm:$false
Expand Down Expand Up @@ -458,7 +458,7 @@ if ($ViServersList.count -gt 0) {

if ($(Get-ChildItem "/mnt/wfs/inventory/ViDsInventory.*.csv")) {
Write-Host "$((Get-Date).ToString("o")) [INFO] Rotating ViDsInventory.*.csv files ..."
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViDsInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViDsInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property Name | ?{$_.SideIndicator -eq "<="}
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/ViDsInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/ViDsInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property FullName | ?{$_.SideIndicator -eq "<="}
If ($ExtraCsvFiles) {
try {
Get-ChildItem $ExtraCsvFiles.name | Remove-Item -Force -Confirm:$false
Expand Down
4 changes: 2 additions & 2 deletions opt/veeam/VbrPullStatistics.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
param([Parameter (Mandatory=$true)] [string] $Server, [Parameter (Mandatory=$true)] [string] $SessionFile, [Parameter (Mandatory=$false)] [string] $CredStore)

$ScriptVersion = "0.9.41"
$ScriptVersion = "0.9.42"

$ExecStart = $(Get-Date).ToUniversalTime()
# $stopwatch = [system.diagnostics.stopwatch]::StartNew()
Expand Down Expand Up @@ -404,7 +404,7 @@ if ($($VbrJobsStates.data)) {

if ($(Get-ChildItem "/mnt/wfs/inventory/VbrVmInventory.*.csv")) {
SexiLogger "[INFO] Rotating VbrVmInventory.*.csv files ..."
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/VbrVmInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/VbrVmInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property Name | ?{$_.SideIndicator -eq "<="}
$ExtraCsvFiles = Compare-Object $(Get-ChildItem "/mnt/wfs/inventory/VbrVmInventory.*.csv") $(Get-ChildItem "/mnt/wfs/inventory/VbrVmInventory.*.csv"|Sort-Object LastWriteTime | Select-Object -Last 10) -property FullName | ?{$_.SideIndicator -eq "<="}
If ($ExtraCsvFiles) {
try {
Get-ChildItem $ExtraCsvFiles.name | Remove-Item -Force -Confirm:$false
Expand Down

0 comments on commit 5e066ca

Please sign in to comment.