Showing posts with label PullDP. Show all posts
Showing posts with label PullDP. Show all posts

Monday, January 21, 2019

SCCM Powershell script to add package to Distribution Point - SCCM_AddPackageToDP.ps1

 Below a script permitting to add Package to Distribution Point/Pull DP
Option -ForceToDeletePackageBeforeIfExist delete 1st and add when there is a problem

Example :
.\SCCM_AddPackageToDP.ps1 -DistPoint "SERVER01" -Package "ABC00123"


Example if you want to use a .csv file like this below

"PackageID";"DistributionPoint";"SiteCode"
"XXX00233";"computerdp1";"ABC"
"XXX00233";"computerdp2";"ABC"


 .\SCCM_AddPackageToDP.ps1 -ImportFilePath .\mydp.csv  





<#
.Synopsis
   Add Package to Distribution Point
.EXAMPLE
   SCCM_AddPackageToDP.ps1 -DistPoint "SERVER01" -Package "ABC00123"
#>
[cmdletbinding()]
Param(
    [String]$ImportFilePath=""
    ,[String]$DistPoint=""
    ,[String]$Package=""
    ,[String]$CM="mycm.mydomain.net"
    ,[String]$PrimarySiteCode="XXX"
    ,[switch]$ForceToDeletePackageBeforeIfExist
)

# For Time checking
$MeasureCommandBegin = Get-Date           


$strCurDir = Split-Path -parent $MyInvocation.MyCommand.Path
$strScriptName = $MyInvocation.MyCommand.Name
$date_for_file = Get-Date -format "yyyy-MM-dd_HHmmss"


#Import the Module
Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1")





# to do BEFORE cd ABC: sitecode
#
[ARRAY]$arrItems = @()
if ($ImportFilePath -ne "") {
    If ( (Test-Path -Path "$ImportFilePath") -eq $False ) {
        Write-host -ForegroundColor Red "file '$($ImportFilePath)' NOT exist. Please indicate real file path."
        cd $strCurDir
        Exit
    }

    Write-Host "Get '$($ImportFilePath)' content"
    $arrItems = Import-Csv $ImportFilePath -Delimiter ';'        #Import CSV into array
    Write-Host "Number of line: $($arrItems.Count)"
    if ($arrItems.Count -eq 0) {
        Write-host "file '$($ImportFilePath)' NO line. Please check It. Must have this header:" -ForegroundColor Red
        Write-host "DistributionPoint;PackageId"  -ForegroundColor Red
        cd $strCurDir
        Exit
    }
}



$Error.Clear()
if ($PrimarySiteCode) {
    Set-Location "$($PrimarySiteCode):\"
} else {
    $CMSITE = Get-PSDrive -PSProvider CMSITE    # multiple not work
    if ($CMSITE.GetType().Name -eq "Object[]") {
        $sitecodes = ""
        $CMSITE | ForEach-Object { $sitecodes = $_.Name + " " + $sitecodes }
        Write-Host "Please indicate Which Site Code to use in parameter 'PrimarySiteCode'. Choose using one of them: $sitecodes"

        Exit
    } else {
        Set-Location "$($CMSITE.Name):\"
    }
}
if ($Error) {
    $Error
    Write-Host "if not found can be necessary to do a 'Remove-Module ConfigurationManager' "
    cd $strCurDir
    Exit
}







if ($ImportFilePath -eq "") {
    if ($DistPoint -eq "" -or $Package -eq "") {
        Write-Host "You need at least Parameter 1 -DistPoint for 'Distribution Point' and -Package for package(s)"
        Write-Host "either -DistPoint for 'Distribution Point' and -Package for package(s)"
        Write-Host "either -ImportFilePath for path with all DistributionPoint;PackageId lines"
        cd $strCurDir
        Exit
    }

    $Query = "Select NALPath,Name From SMS_DistributionPointInfo Where ServerName Like '%$DistPoint%'"
    [Array] $arrDistributionPoint = @()
    $arrDistributionPoint = @(Get-WmiObject -Namespace "root\SMS\Site_$PrimarySiteCode" -Query $Query -ComputerName $CM)
    if($arrDistributionPoint.Count -ne 1) {       
        Foreach($DP in $arrDistributionPoint) {
            Write-host $DP.Name -ForegroundColor Yellow
        }
        Write-host "Found $($arrDistributionPoint.Count) matching Distribution Points. Please redefine query." -ForegroundColor Red
        cd $strCurDir
        Exit
    }
    else
    {
        $ServerNalPath = $arrDistributionPoint.NALPath -replace "([\[])",'[$1]' -replace "(\\)",'\$1'
        $DPname = $arrDistributionPoint.Name
        Write-Host "Distribution Point: $ServerNalPath"
    }
    Foreach ($pkg in $Package) {
        $item = New-Object –TypeNamePSObject
        $item | Add-Member –MemberTypeNoteProperty –Name DistributionPoint –Value $DPname
        $item | Add-Member –MemberTypeNoteProperty –Name PackageId –Value $pkg
        $arrItems += $item
    }


}

# Get all packages
#
Write-Host "Get all Packages"
[HashTable] $hashPackageType = @{}
$arrSMS_PackageBaseclass = @(Get-WmiObject -Namespace "root\SMS\Site_$PrimarySiteCode" -Class SMS_PackageBaseclass -ComputerName $CM)
Foreach ($SMS_PackageBaseclass in $arrSMS_PackageBaseclass) { 
    if ($hashPackageType.ContainsKey($SMS_PackageBaseclass.PackageID) ) {
        # Should not arrive problem in DB
    } else {
        $hashPackageType[$($SMS_PackageBaseclass.PackageID)] = $($SMS_PackageBaseclass.PackageType)
    }
}

[ARRAY] $arrCmdRemoveContent = @()
[ARRAY] $arrCmdAddContent = @()
[HashTable] $hashDPExist = @{}
[HashTable] $hashDPExistingPackages = @{}
$NbItemStay = $($arrItems.Count)
Foreach ($item in $arrItems) {

    Write-host "-----------------------"
    Write-host "Nb of items remaining: $($NbItemStay)"
    $NbItemStay = $NbItemStay -1
    $bError = $false


    $DistributionPoint = $item.DistributionPoint
    if ($DistributionPoint.length -eq 0) {
        Write-host "Value SiteServer $($DistributionPoint) NOT exist" -ForegroundColor Red
        $bError = $True
    } else {
        if ( $hashDPExist.ContainsKey($DistributionPoint) ){
            # OK already do some actions to verify it exist
        } else {

<#
            # DNS test
            Try {   
                $result = Resolve-DNSName -Name $DistributionPoint -Type A -ErrorAction Stop
                Write-host "SiteServer $($DistributionPoint) DNS OK"
                $hashDPExist[$DistributionPoint]= 1
            } Catch {
                Write-host "Cannot Resolve DNS for $($DistributionPoint) " -ForegroundColor Red
                $bError = $True
            }
#>

            $Query = "Select NALPath,Name From SMS_DistributionPointInfo Where ServerName Like '%$DistributionPoint%'"
            [Array]$arrDistributionPoint = @()
            $arrDistributionPoint = @(Get-WmiObject -Namespace "root\SMS\Site_$PrimarySiteCode" -Query $Query -ComputerName $CM)
            if($arrDistributionPoint.Count -ne 1) {       
                Foreach($DP in $arrDistributionPoint) {
                    Write-host $DP.Name -ForegroundColor Yellow
                }
                Write-host "Found $($arrDistributionPoint.Count) matching Distribution Points. Please redefine query." -ForegroundColor Red
                $bError = $True
            }
            else
            {
                $ServerNalPath = $arrDistributionPoint.NALPath -replace "([\[])",'[$1]' -replace "(\\)",'\$1'
                $DPname = $arrDistributionPoint.Name
                Write-Host "Distribution Point: $ServerNalPath"

                $hashDPExist[$DistributionPoint] = $DPname


                $Query = "Select PackageID From SMS_PackageStatusDistPointsSummarizer Where ServerNALPath Like '$ServerNALPath'"
                [ARRAY]$arrPackages = @()    # to be sure to count to be an array (else string not count work)
                $arrPackages = Get-WmiObject -Namespace "root\SMS\Site_$PrimarySiteCode" -Query $Query -ComputerName $CM
                Foreach ($pkg in $arrPackages) {
                    $hashline = $DPname + "_" + $pkg.PackageID
                    $hashDPExistingPackages[$hashline] = 1
                }

            }


        }
    }

    $PackageID = $item.PackageID
    if ($PackageID.length -eq 0) {
        Write-host "Value SiteServer $($DistributionPoint) NOT exist" -ForegroundColor Red
        $bError = $True
    } else {
        if ( ($PackageID.Substring(3,5) -eq "00003") -or ($PackageID.Substring(3,5) -eq "00008") ) {
            Write-host "Package $PackageID cannot be redistribute - it is hidden package"
            continue
        }
        if ( $hashPackageType.ContainsKey($PackageID) ) {
            # OK already do some actions to verify it exist
        } else {
            Write-host -ForegroundColor Red "Package $($PackageID) NOT exist"
            $bError = $True
        }
    }

    if ($bError) {
        Write-host "Error line $($item) - NOT DONE -" -ForegroundColor Red
        continue
    }




    $DPname = $hashDPExist[$DistributionPoint]
    $DPType = $hashPackageType[$PackageID]

    Write-Host  $DistributionPoint - $DPname - $PackageID - $DPType
    if (!$DPname -or !$PackageID) {
        Write-Host  "Error: DistributionPoint:$($DistributionPoint) - DPname:$($DPname) - PackageID:$($PackageID) - DPType:$($DPType)"
        continue
    }   

    $hashline = $DPname + "_" + $PackageID
    if ( ($hashDPExistingPackages.ContainsKey($hashline)) -and (!$ForceToDeletePackageBeforeIfExist) ) {
        #
        Write-Host " DP '$DPname' has already $PackageID - NOT Distribute it again - Use -Force to remove and add it"
        continue
    } else {
        $hashDPExistingPackages[$hashline] = 1

        $ContDistCmdParam = ""
            Switch ($DPType) {
            0 {
                $DPTypeValue = "Standard Package"
                $ContDistCmdParam = "-PackageID"
            }
            3 {
                $DPTypeValue = "Driver Package"
                $ContDistCmdParam = "-DriverPackageId"
            }
            4 {
                $DPTypeValue = "Task Sequence Package"
                $ContDistCmdParam = "-TaskSequenceId"
            }
            5 {
                $DPTypeValue = "Software Update Package"
                $ContDistCmdParam = "-DeploymentPackageId"
            }
            6 {
                $DPTypeValue = "Device Setting Package"
            }
            7 {
                $DPTypeValue = "Virtual App Package"
            }
            8 {
                $DPTypeValue = "Application Package"
                $ContDistCmdParam = "-ApplicationId"
            }
            257 {
                $DPTypeValue = "Operating system Image Package"
                $ContDistCmdParam = "-OperatingSystemImageId"
            }
            258 {
                $DPTypeValue = "Boot Image Package"
                $ContDistCmdParam = "-BootImageId"
            }
            259 {
                $DPTypeValue = "Operating System Upgrade Package"
                $ContDistCmdParam = "-OperatingSystemInstallerId"
            }
            260 {
                $DPTypeValue = "VHD package"
                Write-Host "Distribute '$DPTypeValue' to DP '$DPname'"
            }
        } # switch end


        if ($ContDistCmdParam) {
            if ($ForceToDeletePackageBeforeIfExist) {
                Write-Host "Force: Remove $PackageID '$DPTypeValue' from DP '$DPname'"
                $cmd = "Remove-CMContentDistribution $ContDistCmdParam $PackageID -DistributionPointName $DPname -Force"
                $arrCmdRemoveContent += $cmd
                #Invoke-Expression $cmd
                #Write-Host "Wait 15 sec"
                #Start-Sleep -s 15
            }

            Write-Host "Distribute $PackageID '$DPTypeValue' to DP '$DPname'"
            $cmd = "Start-CMContentDistribution $ContDistCmdParam $PackageID -DistributionPointName $DPname"
            $arrCmdAddContent += $cmd
            #Invoke-Expression $cmd

        } else {
            Write-Host "NOT Distribute $PackageID '$DPTypeValue' to DP '$DPname'"
        }

    }
}

Foreach ($cmd in $arrCmdRemoveContent) {
    Write-Host $cmd
    Invoke-Expression $cmd
}

Write-Host "Wait 15 sec"
Start-Sleep -s 15

Foreach ($cmd in $arrCmdAddContent) {
    Write-Host $cmd
    Invoke-Expression $cmd
}


cd $strCurDir



$MeasureCommandEnd = Get-Date
$MeasureCommandTime = $MeasureCommandEnd - $MeasureCommandBegin
Write-host "Script Executing in $($MeasureCommandTime.Day) day(s) $($MeasureCommandTime.Hour) hour(s) $($MeasureCommandTime.Minutes) minute(s) $($MeasureCommandTime.Seconds) second(s) "



Tuesday, December 11, 2018

SCCM - Content failed to update package - PullDP notification failed.


One on my PullDP not working since some days. Some content failed to update package



As you can see SMS_DP$ have always .tz files



Usually, it is a IIS Problem or client problem. All my check seems indicated all working...

BUT reading PkgXferMgr.log log file on my secondary  I can see some errors on this Pull DP

Failed to notify PullDP. check \\SCOMPUTERNAME.DOMAIN.NET\SMS_DP$\sms\logs\smsdpprov.log
 PullDP notification failed. Failure count = 1/30, Restart time = 11/12/2018 1:38:08 AM AUS Eastern Daylight Time

















As all my test not indicated anything wrong,  I use (again) ApiMonitor to monitor SCCM API

IWbemServices::ExecMethod ( "SMS_DistributionPoint", "NotifyPullDP", 0, NULL, NULL, 0x000000be9ccdf910, NULL )    WBEM_E_PROVIDER_LOAD_FAILURE    0x80041013 = Provider load failure










Now I try to finding to duplicate same problem using Powershell

using this next commands I finally find same problem
Get-WmiObject -ComputerName MYCOMPUTER.MYDOMAIN.NET -Namespace Root\SCCMDP -Class SMS_DistributionPoint
















But using WbemTest it seems there is no problem























So I suppose it was a WMI Problem. To check that I restart WMI









and I try powershell script again  (seconde line)















And now it works!!

as  PkgXferMgr.log log file  indicate:
Attempted max retry count. The job would be marked for deletion now.

I must redistribute package























Wait 5 minute and now PkgXferMgr.log log file  indicate
 Pull DP Sending thread complete

 and we can see SMS_DP$ already deleted .tz and begin to download


and SCCMContentLib\PkgLib have already downloaded XXX0022E package
















Problem solved


Friday, May 4, 2018

SCCM: Re-Push Pull Distribution Point




I have a lot of Pull Distributiont Point to manage (near 3000..). My problem is people around the world managing Pull Distribution Point computers are not always IT. Sometimes, they remove folder for "good" reasons or whatever. And sometimes it is SCCM which makes some impressive bugs...

An example below: I checked share on this Pull Distribution Point

Get-WmiObject -ComputerName PULLDPNAME -Class win32_share


 As you can see below, on PULLDPNAME, if you check real path, NO MORE SMS_DP$ share in E:\SMS_DP$...



or that thing: SMS-DP$ exist but NO MORE SMS sub folder...


or this thing:
Product: ConfigMgr Distribution Point -- Error 1706. An installation package for the product ConfigMgr Distribution Point cannot be found. Try the installation again using a valid copy of the installation package 'pulldp.msi'.




You know what ? I am really bored to uninstall and re-install  Pull Distribution Point each time (we have a lot of sites with slow bandwidth...).
So, as a bad boy, I searched how to re-install Pull DP as Microsoft does not give this option.
And I found something interesting.

I first create NO_SMS_ON_DRIVE.SMS on all drive EXCEPT the one which will be the good one for PullDP content.


Then I also check freespace and display only disk drive (NOT usb drive) using:
  Get-WmiObject -ComputerName PULLDPNAME -Class win32_logicaldisk -Filter " DriveType=3 " | Select DeviceID, @{Name='FreeSpace(GB)';Expression={  [math]::Round($_.FreeSpace/1GB,2) }},@{Name='Size(GB)';Expression={ [math]::Round($_.Size/1GB,2)}}


And now I verify PullDP State. For that I found that DistributionPoints table was THE reference  (WARNING: you MUST run these next queries on your Secondary SQL if your PullDP is on a Secondary, and use SQL queries on your Primary if your PullDP is attached on your Primary)

WARNING: USE SQL QUERIES IS NOT SUPPORTED BY MICROSOFT. Do not use queries on Production. Here is is just information to know how work SCCM.

SELECT DPID,IsPullDPInstalled,State,ServerName
from DistributionPoints
where 1=1
AND ServerName like '%PULLDPNAME%'
--Get infos for PULLDPNAME

As you can see IsPullDPInstalled and State field with 1 value permit to indicate PullDP is installed.






After some research I found if we change these 2 values to 0 that permit to re-run PullDP installation 
Something like:

SELECT DPID,IsPullDPInstalled,State,ServerName
from DistributionPoints
where 1=1
AND ServerName like '%PULLDPNAME%'
--Get infos for PULLDPNAME

UPDATE DistributionPoints
SET IsPullDPInstalled = '0', State = '0'
WHERE ServerName like '%PULLDPNAME%'

SELECT DPID,IsPullDPInstalled,State,ServerName
from DistributionPoints
where 1=1
AND ServerName like '%PULLDPNAME%'
--Get infos for PULLDPNAME








After some minutes DP State come back to state 1

And now Distribution Point Configuration Status indicate that DP installed :)

we can see DistMgr.log
~Processing 98.INS 
~DPID 98 - NAL Path ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ , ServerName = MYPULLDP.MYDOMAIN.NET, DPDrive = , IsMulticast = 0, PXE = 0, RemoveWDS = 0 
PullDP ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ is marked Uninstalled 
user(NT AUTHORITY\SYSTEM) runing application(SMS_DISTRIBUTION_MANAGER) from machine (MYSECONDARY.MYDOMAIN.NET) is submitting SDK changes from site(SEC) 
target processor architecture is x64~ 
Installed file on MYPULLDP.MYDOMAIN.NET, copied E:\Program Files\Microsoft Configuration Manager\bin\x64\..\x64\ContentAuthModule.dll to \\MYPULLDP.MYDOMAIN.NET\ADMIN$\system32\inetsrv\ContentAuthModule.dll 
target processor architecture is x64~ 
Installed file on MYPULLDP.MYDOMAIN.NET, copied E:\Program Files\Microsoft Configuration Manager\bin\x64\..\x64\smsfileisapi.dll to \\MYPULLDP.MYDOMAIN.NET\ADMIN$\system32\inetsrv\smsfileisapi.dll 
Found .ins file for remote server ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\, will try to verify the selected drive and install DP files on this server 
~Try to create folder SMS_DP$ on drive D:\ on server MYPULLDP.MYDOMAIN.NET 
~The drive share \\MYPULLDP.MYDOMAIN.NET\D$\ is accessible. 
~Successfully created SMS_DP$ directory at - \\MYPULLDP.MYDOMAIN.NET\D$\SMS_DP$. 
~Successfully created share SMS_DP$ on server MYPULLDP.MYDOMAIN.NET 
DP share SMS_DP$ already exist on the remote DP~ 
For server MYPULLDP.MYDOMAIN.NET processor architecture is x64~ 
Install Internet server= 3 
~Command line to install IIS: 'dism.exe /online /norestart /enable-feature /ignorecheck /featurename:"IIS-WebServerRole" /featurename:"IIS-WebServer" /featurename:"IIS-CommonHttpFeatures" /featurename:"IIS-StaticContent" /featurename:"IIS-DefaultDocument" /featurename:"IIS-DirectoryBrowsing" /featurename:"IIS-HttpErrors" /featurename:"IIS-HttpRedirect" /featurename:"IIS-WebServerManagementTools" /featurename:"IIS-IIS6ManagementCompatibility"  /featurename:"IIS-Metabase" /featurename:"IIS-WindowsAuthentication"  /featurename:"IIS-WMICompatibility"  /featurename:"IIS-ISAPIExtensions" /featurename:"IIS-ManagementScriptingTools" /featurename:"MSRDC-Infrastructure" /featurename:"IIS-ManagementService" '. 
~OS version 6.3.9600: installed IIS on remote server MYPULLDP.MYDOMAIN.NET. 
user(NT AUTHORITY\SYSTEM) runing application(SMS_DISTRIBUTION_MANAGER) from machine (MYSECONDARY.MYDOMAIN.NET) is submitting SDK changes from site(SEC) 
STATMSG: ID=2362 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=MYSECONDARY.MYDOMAIN.NET SITE=SEC PID=2916 TID=11960 GMTDATE=mar. déc. 11 14:41:12.020 2018 ISTR0="MYPULLDP.MYDOMAIN.NET" ISTR1="0" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=404 AVAL0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" 
StateTable::CState::Handle - (2362:1 2018-12-11 14:41:12.020+00:00) >> (2364:1 2018-09-12 06:23:24.906+00:00) 
Inbox source is local on MYSECONDARY 
CStateMsgReporter::DeliverMessages - Queued message: TT=1401 TIDT=0 TID='4618D922-D9FB-4D11-A4AE-5703EA77AEDF' SID=2362 MUF=0 PCNT=2, P1='SEC' P2='2018-12-11 14:41:12.020+00:00' P3='' P4='' P5='' 
CStateMsgReporter::DeliverMessages - Created state message file: E:\Program Files\Microsoft Configuration Manager\inboxes\auth\statesys.box\incoming\xkrggttj.SMX  
Successfully send state change notification 4618D922-D9FB-4D11-A4AE-5703EA77AEDF 
OS information for the server - 6.3.9600 
OS information for the server - 6.3.9600, ProductType=3 
Failed to get dependent services of wdsserver 
Failed to get dependent services of sccmpxe 
File to copy: smscore.dll 
Successfully copied: smscore.dll 
File to copy: ccmgencert.dll 
Successfully copied: ccmgencert.dll 
File to copy: smspxe.dll 
Successfully copied: smspxe.dll 
File to copy: sccmpxe.exe 
Successfully copied: sccmpxe.exe 
File to copy: ccmcore.dll 
Successfully copied: ccmcore.dll 
File to copy: CCMUtilLib.dll 
Successfully copied: CCMUtilLib.dll 
File to copy: TSMessaging.dll 
Successfully copied: TSMessaging.dll 
File to copy: tscore.dll 
Successfully copied: tscore.dll 
File to copy: CommonUtils.dll 
Successfully copied: CommonUtils.dll 
File to copy: ccmperf.dll 
Successfully copied: ccmperf.dll 
Configure MSXML 6.0 on DP MYPULLDP.MYDOMAIN.NET 
MSXML 6.0 is configured on DP MYPULLDP.MYDOMAIN.NET successfully 
Run command 'D:\SMS_DP$\sms\bin\vcredist_x64.exe /q /norestart /log "D:\SMS_DP$\sms\bin\vcredist.log"' to install VC redist 
~Successfully installed DP WMI provider on the remote distribution point 
Failed to configure IIS module, GLE - 1168 
ConfigureIISModules failed to configure IIS module 
SQL MESSAGE: spProcessCcmCertBindingState - Updating CM_RoleSSLCertificates for MYPULLDP.MYDOMAIN.NET state=1 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Acquired registry mutex. 
~Port = 80 
~Adding Port = 80 
~Successfully updated the  port list in IIS. 
~Successfully started the default website. 
~SSL is not required. Skipping prerequisite checks for SSL. 
target processor architecture is x64~ 
target processor architecture is x64~ 
~Successfully created the virtual directory SMS_DP_SMSPKG$ for the physical path D:\SCCMContentLib.~ 
~Failed to delete file extension C:\WINDOWS\system32\inetsrv\smsfileisapi.dll. 
~Successfully added file extension C:\WINDOWS\system32\inetsrv\smsfileisapi.dll. 
~Failed to remove application dependency - SMS Distribution Point | SMS_DP. 
~Acquired registry mutex. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~The  port list has not changed. DM will not modify the SMS Port List. 
~SSL is not required. Skipping prerequisite checks for SSL. 
target processor architecture is x64~ 
target processor architecture is x64~ 
~Successfully created the virtual directory SMS_DP_SMSSIG$ for the physical path \\MYPULLDP.MYDOMAIN.NET\SMSSIG$.~ 
~Successfully added file extension C:\WINDOWS\system32\inetsrv\smsfileisapi.dll. 
~Acquired registry mutex. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Creating, reading or updating IIS registry key for a distribution point. 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
~Acquired registry mutex. 
STATMSG: ID=2375 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=MYSECONDARY.MYDOMAIN.NET SITE=SEC PID=2916 TID=11960 GMTDATE=mar. déc. 11 14:43:04.150 2018 ISTR0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=404 AVAL0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" 
Configure IIS virtual directories successfully on the distribution point MYPULLDP.MYDOMAIN.NET 
Initialize monitoring task on MYPULLDP.MYDOMAIN.NET 
DP settings have been updated to MYPULLDP.MYDOMAIN.NET. 
Initialize usage gathering task on MYPULLDP.MYDOMAIN.NET 
DP settings have been updated to MYPULLDP.MYDOMAIN.NET. 
No DMP found.. 
ConfigureDP 
~IISPortsList in the SCF is "80". 
~IISSSLPortsList in the SCF is "443". 
~IISWebSiteName in the SCF is "". 
~IISSSLState in the SCF is 448. 
DP registry settings have been successfully updated on MYPULLDP.MYDOMAIN.NET 
STATMSG: ID=9501 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=MYSECONDARY.MYDOMAIN.NET SITE=SEC PID=2916 TID=11960 GMTDATE=mar. déc. 11 14:43:10.196 2018 ISTR0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=404 AVAL0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" 
STATMSG: ID=9503 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=MYSECONDARY.MYDOMAIN.NET SITE=SEC PID=2916 TID=11960 GMTDATE=mar. déc. 11 14:43:10.212 2018 ISTR0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=404 AVAL0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" 
ConfigurePXE 
Creating, reading and or updating Operations Management server role registry keys for a Distribution Point ... 
PullDP ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ is marked Uninstalled 
user(NT AUTHORITY\SYSTEM) runing application(SMS_DISTRIBUTION_MANAGER) from machine (MYSECONDARY.MYDOMAIN.NET) is submitting SDK changes from site(SEC) 
user(NT AUTHORITY\SYSTEM) runing application(SMS_DISTRIBUTION_MANAGER) from machine (MYSECONDARY.MYDOMAIN.NET) is submitting SDK changes from site(SEC) 
STATMSG: ID=2399 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=MYSECONDARY.MYDOMAIN.NET SITE=SEC PID=2916 TID=11960 GMTDATE=mar. déc. 11 14:43:16.431 2018 ISTR0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" ISTR1="MYPULLDP.MYDOMAIN.NET" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=404 AVAL0="["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\" 
~DPID 98 - NAL Path ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ , ServerName = MYPULLDP.MYDOMAIN.NET, DPDrive = , IsMulticast = 0, PXE = 0, RemoveWDS = 0  $
ConfigurePullDP 
~NAL Path ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ is a Pull DP 
For server MYPULLDP.MYDOMAIN.NET processor architecture is x64~ 
Installing PullDP, check \\MYPULLDP.MYDOMAIN.NET\SMS_DP$\sms\logs\smsdpprov.log and \\MYPULLDP.MYDOMAIN.NET\SMS_DP$\sms\logs\pulldp_install.log 
PullDP ["Display=\\MYPULLDP.MYDOMAIN.NET\"]MSWNET:["SMS_SITE=SEC"]\\MYPULLDP.MYDOMAIN.NET\ is marked Installed 
 


To be sure all is OK, redistribute 1 package (\Administration\Overview\Site Configuration\Servers and Site System Roles for printscreen but script is better :) because after you perhaps need to redistribute all package again  -> please verify all seems work correctly after on your PullDP)


And now all seems OK





Good. Now, I can Re-Push Pull Distribution Point :)