An issue has occured recently in our environment where some computer models, in our case Dell Precision T7600 models, sometimes fail to join the domain during an imaging task sequence, but do not fail the task sequence until they get to the first “Install Applications” step in the sequence. Computers that fail in this way do not have a netsetup.log file where it should be, meaning the computer couldn’t even contact the domain to attempt to join. Further exploration of the log files on the failed client shows the following two clues:
[DJOIN.EXE] Unattended Join: NetJoinDomain failed error code is 
[DJOIN.EXE] Unattended Join: Unable to join; gdwError = 0x54b
No adapters found in environment. Performing global finalization only.
It turned out in our case that the task sequence was failing to join the domain because the network adapter was too slow to respond after the reboot. I’m not sure if this is due to the T7600’s dual network adapters or some other reason, but so far this is the only model that has shown this behavior in all the years we’ve been using SCCM. In addition, the problem is intermittent and does not always happen – sometimes the machines do succeed in joining AD.
The workaround for this problem is to add a “Join Domain or Workgroup” step in the task sequence (which can be found in the “Add > General” menu in the task sequence editor window) after the “Setup Windows and Configuration Manager” step, and add a delay between the two steps. I added a two minute delay, but that might be overkill. After making this small modification to the task sequence, every single computer completed the second domain join step and therefore finished the rest of the task sequence successfully. Here is what it should look like: Continue reading
In the past I posted how to configure or clear the SCCM client cache using Powershell scripts, but that method required a separate script for each cache size you might want to set. This new script allows on-the-fly modification of the CCM Cache from a task sequence using a single SCCM package containing this new Powershell script.
To use this script, you will need to create a package in SCCM with the source contents containing this script. You do not need to create a program for the package. Make sure the package can be used by task sequences without being deployed. After distributing the package, just call it from a task sequence using a “Run Command Line” step referencing the package.
Assuming you save the script as “sccmCache.ps1”, any of these usage examples will work:
powershell -executionpolicy bypass -file sccmCache.ps1 -cacheSize 5120 -clearCache yes
powershell -executionpolicy bypass -file sccmCache.ps1 5120 clear
powershell -executionpolicy bypass -file sccmCache.ps1 -cacheSize 5120
powershell -executionpolicy bypass -file sccmCache.ps1 5120
powershell -executionpolicy bypass -file sccmCache.ps1 -clearCache yes
powershell -executionpolicy bypass -file sccmCache.ps1 clear
And here is the Powershell script:
SCCM’s power configuration options allow setting a wakeup time for computers, but only for desktops. Currently SCCM has no option to enable wakeup for laptops. The idea behind this is that a laptop can be in a bag and so should not be woken up automatically, but it would still be nice to have an option to enable this if you know for sure that your laptops will not be inside a laptop bag during the wakeup time, such as laptops used in lab environments.
Setting a wakeup time for laptops can be accomplished with a PowerShell script and a Task Scheduler task. This can be deployed with SCCM as a package targeting your laptop collections.
The first part is to enable wake timers using Powershell. SCCM’s power configuration options for a device collection can enable wake timers but again only for desktops, with no option at all to allow wake timers for laptops. This script can work with or without having an SCCM power configuration set for the device. As the device switches between peak and non-peak hours and therefore applies different SCCM power configurations automatically, it will still keep wake timers turned on when configured with this script. Here is the script (this one is floating around the internet – I didn’t write it), and you can selectively enable or disable wake timers for DC (on battery) and AC power (plugged in) by changing the $AllowWakeTimersGUI value for SETDCVALUEINDEX and SETACVALUEINDEX:
If you need to clear the SCCM client cache or increase the cache size on individual clients, there are a few different ways to do it. One of the methods usually posted on a lot of blogs and forums is actually the wrong way to do it, because it requires restarting the CCMEXEC process on the client in order to update the new cache settings, which makes the task sequence used to deploy the script fail since CCMEXEC, which was running the deployment, has been terminated.
Here I will show you the right way to clear the CCM cache that does not require restarting the CCMEXEC process. This PowerShell script can be deployed with SCCM as a package or as part of a task sequence. Sometimes this method is preferable to using Right Click Tools, especially if you want to only change cache settings during application deployment, such as part of a task sequence that installs multiple large applications. Sometimes it doesn’t make sense to keep 30GB of installers cached on the computer and it’s better to just manually flush the cache after the installation completes.
Here is the script to clear the ccmcache:
I wrote this PowerShell script for use as an application detection method inside an SCCM application. The SCCM application would set the network adapter configuration if it is not currently configured properly. This company has a special DNS setup for SCCM clients that is different than for non-SCCM clients. Here is the PowerShell code:
Contrary to popular belief, Dell’s CCTK tools (now called Dell Command Configure) do not have to be injected into WinPE in order to make changes to the BIOS during the WinPE phase of a task sequence. This applies both to SCCM and MDT task sequences.
The benefit to not injecting CCTK into WinPE is that it can be updated and maintained without having to rebuild boot images.
To do this, simply create a package in SCCM with the required CCTK files, or in MDT create a folder in the deployment share. Do not create a program for this package. The components required are:
Next, create a task sequence that references the package you created. The first step will be to install HAPI, which can be done inside of WinPE. Since WinPE runs like a “live-cd” no changes will be persistent. Your task sequence should look like this:
In this example I am setting a wake-up time in the BIOS. Below are my commands for each of these steps in the task sequence: