Monday, December 19, 2011

Troubleshooting advertisements stuck in - Waiting for content



Sometimes an Advertisement gets stuck in Waiting state, like this:


Upon viewing the execmgr.log file, you may see this line:


And, in the contentTransfermgr.log, you can see this line:


Cause:

This is due to some error in BITS transfer from the DP to the client cache.

Resolution:

1.     First disable BITS on the DP from where the client is downloading the content (you can get this from datatransferservice.log).


2.     Wait for 10 minutes for changes to take effect.
3.     Reset the policies on the client (use SCCM Client Center->Policy Reset (Hard-Reset)).

4.     Delete the cache folder for that advertisement.
5.     Request the Machine Policy.
6.     Rerun the Advertisment.
7.     Check the execmgr.log for success.
8.     To rerun the Advertisement on ALL the failed computers, create a new Program with same settings and rerun the Advertisement,



Error - PXE test request failed, status code is -2147467259, 'Error receiving replies from PXE server'.

Sometimes, after your configure WDS on a secondary site server, and then enable PXE role on it, you get the above error in the pxecontrol.log file.


And, the wdsserver service will also not start (error code 87).

Solution:

Change the below regitry key

HKLM\SYSTEM\CurrentControlSet\Services\WDSServer\Providers\WDSPXE\IsCritical from 1 to 0

If you get  error code 10048 while starting the wdsserver service, then do the following:
  1. Click Start, click Run, type wdsmgmt.msc, and then press OK.
  2. In the Windows Deployment Services window, expand Servers, right-click the WDS server name, and then click Properties.
  3. In the Server Properties dialog box, click the DHCP tab.
  4. Click to select the Do not listen on port 67 check box, and then click Apply.

Tuesday, September 13, 2011

Script to refresh list of packages to list of DPs in SCCM

' Pratik Pawar
' This script will refresh the packages given in text file listofpackagesToRefresh.txt to that DP


Option Explicit
On Error Resume Next

Dim objFSO
Dim objTextFile
Dim strNextLine
Dim arrServiceList

Dim WbemServices
Dim loc

Set loc = CreateObject("WbemScripting.SWbemLocator")
Set WbemServices = loc.ConnectServer( , "root\SMS\site_xxx")

Const ForReading = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("E:\DWM Tools\Scripts\listofpackagesToRefresh.txt", ForReading)


Do Until objTextFile.AtEndOfStream
    'read the next line
    strNextLine = objTextFile.Readline
    arrServiceList = Split(strNextLine , "    ")

    'arrServiceList(0) = packageid, arrServiceList(1) = DP
    Wscript.Echo "packageID: " & arrServiceList(0)
    Wscript.Echo "DP : " & arrServiceList(1)



    Set DPs = wbemServices.ExecQuery("Select * From SMS_DistributionPoint WHERE PackageID='" & arrServiceList(0) & "' AND SiteCode = '" & arrServiceList(1) & "'")

    For Each DP In DPs
        Wscript.Echo " Refreshing : " & DP.SiteName
        'DP.RefreshNow = True
        DP.Put_
    Next
Loop

Script to assign a list of packages to list of DPs in SCCM

' PRatik Pawar
' This script will assign the packages given in text file listofPackageToAssign to that DP

Option Explicit
'On Error Resume Next

Dim objFSO
Dim objTextFile
Dim strNextLine
Dim arrServiceList

Dim loc
Dim WbemServices
Dim distributionPoint
Dim serverName
Dim AllDPs, DP
Dim Site
Dim newDP

Dim wbemFlagReturnImmediately
Dim wbemFlagForwardOnly

wbemFlagReturnImmediately = 16
wbemFlagForwardOnly       = 32

Set loc                   = CreateObject("WbemScripting.SWbemLocator")
Set WbemServices          = loc.ConnectServer( , "root\SMS\site_xxx")

Const ForReading = 1

Set objFSO      = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("E:\DWM Tools\Scripts\listofpackagesToAssign.txt", ForReading)

Do Until objTextFile.AtEndOfStream
    'read the next line
    strNextLine    = objTextFile.ReadLine
    arrServiceList = Split(strNextLine , "    ")

    'arrServiceList(0) = packageid, arrServiceList(1) = DP

    Set AllDPs = wbemServices.ExecQuery("Select * From SMS_SystemResourceList WHERE RoleName='SMS Distribution Point' and SiteCode = '" & arrServiceList(1) & "'")

    For Each DP In AllDPs
        Set Site = WbemServices.Get("SMS_Site='" & DP.SiteCode & "'")
        Set newDP = WbemServices.Get("SMS_DistributionPoint").SpawnInstance_()
        newDP.ServerNALPath = DP.NALPath
        newDP.PackageID = arrServiceList(0)
        newDP.SiteCode = DP.SiteCode
        newDP.SiteName = Site.SiteName
        newDP.Put_
    Next

    ' Display notification text.
    Wscript.Echo "Assigned package: " & arrServiceList(0) & "    to DP: " & arrServiceList(1)

Loop

Tuesday, August 2, 2011

Error : PXE Boot aborted. Booting to the next device

Sometimes, while trying to boot from PXE server, you might get this error:

Downloaded WDSNBP

Architecture: x64

The details below show the information relating to the PXE boot request for this computer. Please provide these details to your Windows Deployment Services Administrator so that this request can be approved.

Pending Request ID: 45

Contacting Server: 192.168.3.1.
TFTP Download: smsboot\x64\abortpxe.com

PXE Boot aborted. Booting to next device...

To fix this there are two methods: for known computers and unknown computers.

1 Known Computers


If it is an already existing computer that is being reimaged, then you need to 'clear the last PXE advertisement'.
Right click on the Collection and select Clear last PXE advertisement.

After some time, you will find that this method no longer works. Then you can use the below method.

1      Find out the name of the computer you are trying to image. (If you don’t know the name, then try searching by the Mac address). Go to your OS distribution collection.
2      Open the collection properties.
3      Then, create a new direct membership rule. On the Search for the resources page, give Resource class as System Resource, then give the name of the computer.



4      On the select resources page, you will find that there are two entries (the second one is the new one you are imaging). Select both, and them.
5      That’s it. Now SCCM will see your computer and the process will start.


Sometimes, you need to restart the WDS service to make the change effective J

This will work for Known computers.

2 Unknown Computers


For Unknown computers (bare metal), create a new Task sequence advertisement, and point it to the All Unknown Computers collection (this is a built in collection, new in 2007 R2).


Again, restart the WDS Service.

Note: For any troubleshooting, you should check the smspxe.log. It is present at <Local DP>\c$\sms_scc\logs\smspxe.log.