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
+29
View File
@@ -0,0 +1,29 @@
# list
$ProtectionGroups = Get-CohesityProtectionJob | where-object environment -eq kVMware | sort-object Name
$ProtectionGroups | Select-Object name, @{n = 'AllowPrefixes'; e = { $_.indexingpolicy.allowprefixes } }, @{n = 'DenyPrefixes'; e = { $_.indexingpolicy.denyprefixes } } | sort-object Name
<#ignore
program files x2
var
#>
$indexingPolicy = [PSCustomObject]@{
disableIndexing = $false;
allowPrefixes = @('/');
denyPrefixes = @('/$Recycle.Bin','/Windows','/ProgramData','/System Volume Information','/Users/*/AppData','/Recovery','/usr','/sys','/proc','/lib','/grub','/grub2','opt/splunk','/splunk')
}
#$ProtectionJob = Get-CohesityProtectionJob -Names "DOH-StarLIMS@itdvmvc1"
$ProtectionGroups = Get-CohesityProtectionJob | where-object environment -eq kVMware | sort-object Name
ForEach ($ProtectionJob in $ProtectionGroups) {
If($ProtectionJob.indexingPolicy){
$ProtectionJob.indexingPolicy = $indexingPolicy
}
Else
{
$ProtectionJob | Add-Member -MemberType NoteProperty -Name indexingPolicy -Value $indexingPolicy
}
Set-CohesityProtectionJob -ProtectionJob $ProtectionJob -Confirm:$false
}