Detecting the SCCM DP or AD Site
Hi all,
I've configured an MDT OSD Task sequence in SCCM to be deploy Windows 7 at a couple of different AD sites/SCCM secondary sites and timezones.
I currently use the DefaultGateway= xxx.xxx.xxx.xxx Task Sequence variable with an 'If any' statement to set a custom variable that is then used through out the task sequence to apply specific settings and install applications that are required at that site.
For Example:
Step 1: Setting the custom variable
If any the conditions are true:
Task Sequence variable DefaultGateway001=10.0.0.1
Task Sequence variable DefaultGateway001=10.0.2.1
Task Sequence Variable: XYZSite=West
Step 2: Using the custom variable
If any the conditions are true:
Task Sequence Variable XYZSite=West
Task Sequence Variable: TimeZoneName = W. Australia Standard Time
For this to work, I need to ensure that all the Default gateways are listed in step 1. Is there a better way to do this?
I've tried the TS Variable SMSDP = ServerDP name, but this didn't work in WinPE, the same goes for detecting AD sites, without using a custom script.
September 5th, 2011 8:06pm
For AD site you can use below WMI query to get the details
SELECT ClientSiteName FROM Win32_NTDomain WHERE Description = ‘DomainHere’ AND ClientSiteName = ‘AdSiteName’
For getting Default gate way details, please go through Kim's suggestion in the below thread
http://social.technet.microsoft.com/Forums/en-US/configmgrosd/thread/0592ff95-4170-4713-aa4d-4dbf0e4df1e2/
Hope, you are following the below article to create OSD task sequence variable?
http://technet.microsoft.com/en-us/library/bb632442.aspx Anoop C Nair - Twitter @anoopmannur
MY BLOG:
http://anoopmannur.wordpress.com
SCCM Professionals
This posting is provided AS-IS with no warranties/guarantees and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2011 10:26pm
if the ADsites have their own SCCM site server, you could use %_SMSTSSiteCode% which will return the XXX id of the site you are conected to! This variable is eaven avalible during a CustomMadiaHook part of WinPE, if you use that!Michael Petersen My Deployment Blog -
http://blog.coretech.dk/mip
September 7th, 2011 2:50am