This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch ($No_SMS_Exists) { | |
$false { | |
Write-CMLogEntry -Value "Found that the 'No_SMS_On_Drive.sms' does not exist on $DrivePath - will check for DP folders." | |
$SMS_PackageShareFolder = [string]::Format('SMSPKG{0}$', $Volume.DriveLetter) | |
$SMS_PackageShareFolderPath = Get-ChildItem -Path $DrivePath -Filter $SMS_PackageShareFolder | |
if ($null -ne $SMS_PackageShareFolderPath) { | |
Write-CMLogEntry -Value "Adding $($SMS_PackageShareFolderPath.FullName) to inclusion list for $DrivePath" | |
$Include[$SMS_PackageShareFolderPath.FullName] = $true | |
} | |
$SCCMContentLibFolderPath = Get-ChildItem -Path $DrivePath -Filter 'SCCMContentLib' | |
if ($null -ne $SCCMContentLibFolderPath) { | |
Write-CMLogEntry -Value "Adding $($SCCMContentLibFolderPath.FullName) to inclusion list for $DrivePath" | |
$Include[$SCCMContentLibFolderPath.FullName] = $true | |
} | |
$IncludeCSV = Join-Path -Path $DrivePath -ChildPath $AdditionalIncludes | |
if (Test-Path -Path $IncludeCSV) { | |
Write-CMLogEntry -Value "CSV found for processing additional includes for deduplication - $IncludeCSV" | |
$ExplicitIncludes = Import-Csv -Path $IncludeCSV | |
foreach ($Inclusion in $ExplicitIncludes.Include) { | |
$Inclusion = [string]::Format('{0}\{1}', $DrivePath, $Inclusion) | |
Write-CMLogEntry -Value "$Inclusion added for processing" | |
$Include[$Inclusion] = $true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment