Variable with Full OU path
Take the OU path from 'Network Settings" and turn it into a variable e.g. _SMSMachineOUpath
I use dynamic variables to determine the OU based on location and device so my Domain OU path has OU=%devicetype%,OU=Location,OU=workstations,DC=Contoso,DC.com
so it would be nice to have the actual value in a variable that I can reference later say in a script to move existing object to the above created OU. I can see the full path in the SMSTS.log, but not in a variable. Also removing the LDAP:\ from the start could be handy in some situations I guess.
Vlad ask to pass this on:
He can try at the beginning of TS to add steps to set variables that I listed in my reply to the same strings that he entered in the UI of Network Settings step? Which will result in Network Settings step take the values from these global variables (not from UI, even though they may be the same). But it will also have a side effect that these variables will be available during task sequence for whatever he wants to user them for.
I’ll have a bit of time at the weekend. I’ve a couple of ideas about removing the LDPA:\\ you mentioned. Can you describe the scenario you want to address, please?
Firstly, this really isn't worth spending any time on a weekend looking at... but thank you.
I have a script to move existing machine accounts into a new OU based on Region, site, device type. Hence the LDAP path of ou=%device%,ou=%site%,ou=%location%,ou=contoso,DC=com, DC=au
This works perfectly for new machines or if the machine object is removed from AD prior to building. So what I would like to do is use the populated OU path from above in a script as parameter to move existing machine accounts to the correct OU.
This would enable me to use a single step regardless of where the machine is located.
So since the full LDAP path is being logged out, I was thinking it might be a nice idea to have a variable called _SMSTSFullOUPath which could easily used for such a process.
Marty, you can try (before the Network Settings step) to add steps setting TS variables that are listed in my previous message. You can set them to the same strings that are entered in the UI of Network Settings step (or to something different). Which will result in Network Settings step take the values from these global variables (not from value in UI which will be ignored). This will also have a side effect that these variables will be available during task sequence for whatever purpose that you want to use them for in your scripts.
Thanks Vlad and Bob, I was aware of those variables and I should be able to make them work.
OSDDomainName only populates the final OU, which doesn't provide me with enough information.
The other OSDxxxx variables don't appear to be getting populated when looking at the SMSTS.log or using this script to dump out the variables.
I am happy to share the logs with you if required.
It seems like extra steps, to populate these variables with information that I require when the LDAP path already gets logged out to SMSTS.log (attached file).
I have attached screen shots of my network setting setup and the SMSTS.log with the LDAP entry.
Task sequence step "Apply Network Settings" internally is using task sequence variables, so if someone wants to read them, they already can:
OsdNetworkJoinType // 0=Domain, 1=Workgroup
Documentation already lists OSDDomainName and OSDDomainOUName: