This commit is contained in:
Zack Meier
2026-04-15 15:42:41 -05:00
parent 74edcc4d9a
commit 03dba08135
146 changed files with 9119 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
# datastore
$AllDatastores = Get-Datastore -Name *FS92* | sort-object Name
$AllFiles = @()
ForEach ($Datastore in $AllDatastores) {
write-warning $Datastore.name
Set-Location $Datastore.DatastoreBrowserPath
$expiredFolders = Get-ChildItem | `
Where-Object { $_.Name -notlike "*.sf" -and $_.Name -notlike ".vSphere*" -and $_.Name -notlike ".dvs*" -and $_.Name -notlike ".naa*" -and $_.Name -ne 'vmkdump' -and $_.Name -ne 'syslog'} | `
Where-Object LastWriteTime -LT ((Get-Date).AddDays(-30))
ForEach ($folder in $expiredFolders) {
write-warning $folder.name
$AllFiles += Get-ChildItem -Path $Folder.FullName -Recurse
}
}