Sign up for 1E's newsletter:

Where has the SMSDP variable gone?


The SMSDP Task Sequence variable was around in ConfigMgr 2007 and I used it to get the name of the server where content was being pulled from.

Now in ConfigMgr 2012 the variable has gone. But the good news is you can still find the name of the DP where the content is getting downloaded from by checking the read only task sequence variable starting with _SMSTSHTTP. Starting with… yes the variable is _SMSTSHTTP plus the package been downloaded. For example _SMSTSHTTPSPS20001D.This variable is only populated when content is downloaded from a DP.

The script below will check for the a variable starting with _SMSTSHTTP and if it is set then it will be something like$/PS20001D. We only want the FQDN of the server name so let’s split on “/” and use the 3rd array, remember arrays start at 0. Now we can set SMSDP to the FQDN of the DP.

One thing I have found when deploying the task sequence that will run the script and set the SMSDP variable the deployment distribution options must be set to “Download content when needed by the running task sequence”. This option will not download the package into the CCM cache but directly into the _SMSTaskSequence folder and this option does not use an Alternate Content Provider (ACP) if present. The content will then get deleted after the task sequence runs. This will force the content to be downloaded every time the task sequence is run.

If the deployment distribution option “Download all content locally before starting the task sequence” is used the package will be downloaded into the CCM cache, not a bad option one may think…but when the task sequence runs a second time on the client the _SMSTSHTTP variable will be empty as the package was not downloaded from a DP because the package was already in the CCM cache.

Now we can get on and use the DP FDQN to our hearts’ content.

Get the script here.

Peter Clark | Senior Consultant

You can follow 1E and wider-industry news and events via FacebookGoogle+LinkedIn and Twitter.

To discuss any issues relating to this article with our experts, email, visit our LinkedIn forum, 1E INSIDEV1EW.

If you found this article helpful, please take a moment to share it with your contacts using the social media buttons to the left. Thank you.

Peter Clark

about Peter Clark

Peter Clark has extensive experience in consulting roles focused on Microsoft SMS, ConfigMgr and desktop management. Previously, he worked at BBC Worldwide managing their global desktop environment from group policy to desktop deployment and everything in-between. Peter has been a Senior Consultant at 1E since 2012 and has worked with dozens of organizations to improve their IT efficiency.

Would you like to share your thoughts?

Your email address will not be published.

Please type the characters of this captcha image in the input box

Press Esc to close

This website uses cookies to improve your experience. We'll assume you're ok with this. Privacy setting