Configure TFTP Block Size and TFTP Window Size

$primarysiteserver = "[SERVERNAME]"

$primarysitecode = 'XXX'

$DPS = ""

$DPS = Get-WmiObject -ComputerName $primarysiteserver -Namespace ROOT\SMS\site_$primarysitecode -Query "select * from SMS_DistributionPointInfo" | where {$_.ispxe -eq $true} | select -expandproperty name

foreach ($server in $DPS) {
     write-host $server.ToUpper()

     #The default value is 4096
     $command = "reg add '\\$($server)\HKLM\SOFTWARE\Microsoft\SMS\DP' /v 'RamDiskTFTPBlockSize' /t REG_DWORD /d 8192 /f /reg:64"

     iex "$command"

     #The default value is 1
     $command = "reg add '\\$($server)\HKLM\SOFTWARE\Microsoft\SMS\DP' /v 'RamDiskTFTPWindowSize' /t REG_DWORD /d 6 /f /reg:64"

     iex "$command"
}

Post navigation