none
Hostname in _SMSTSOrgName RRS feed

  • Question

  • Hello there...

    Quick question. For the convenience of my deployment folks, I would like to do the following:

    _SMSTSOrgName=Acme IT - Deployment on %OSDComputerName%

    I have a default OSDComputerName=PC-#Left("%SERIALNUMBER%",12)# but is usually changed by the deployment people to match the username.

    Everything works fine except that _SMSTSOrgName=Acme IT - Deployment on %OSDComputerName% shows PC-#Left("%SERIALNUMBER%",12)# instead of the new name input in the wizard. Should I use another variable? I already tried %HostName% but it shows MININT-% which is worse.

    Any ideas?

    Thanks


    Another Sysadmin Blog: blog.physh.net
    Monday, June 6, 2011 11:17 PM

Answers

  • That wont work sorry. It's because of the way MDT works.

    By the time the OSDComputername prompt comes up, the scripts have already passed the info to _SMSTSOrgName

    It would be nice to have though.

     

    Tuesday, June 7, 2011 12:33 AM

All replies

  • That wont work sorry. It's because of the way MDT works.

    By the time the OSDComputername prompt comes up, the scripts have already passed the info to _SMSTSOrgName

    It would be nice to have though.

     

    Tuesday, June 7, 2011 12:33 AM
  • Guess I'm just going to comment out:

     

    ; OSDComputerName=PC-#Left("%SERIALNUMBER%",12)#

     

    Sad.


    Another Sysadmin Blog: blog.physh.net
    Tuesday, June 7, 2011 1:25 AM
  • No need. As long as the OSDComputerName is set (in another section) before setting the _SMSTSOrgName property you are good.

    [Settings]
    Priority=SetComputerName, Default

    [SetComputerName]
    OSDComputerName=PC-#Left("%SERIALNUMBER%",12)#

    [Default]
    _SMSTSOrgName=%OSDComputerName%

    / Johan


    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch
    Tuesday, June 7, 2011 11:53 AM
    Moderator
  • Yes Johan, it works like that... But as Andrew explained, once OSDComputerName is set, even if you change it in the wizard it won't overwrite the value in _SMSTSOrgName
    Another Sysadmin Blog: blog.physh.net
    Tuesday, June 7, 2011 6:22 PM
  • Ah gotcha.... :)

    There are multiple options for fixing that, a simple solution is having a script reset the value when the task sequence starts.

    / Johan 


    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch
    Wednesday, June 8, 2011 6:38 AM
    Moderator
  • I looked into overwriting the value but it's not worth it. Commenting out OSDComputerName worked fine. Until we switch to a generic naming convention, I'm not bothered.
    Another Sysadmin Blog: blog.physh.net
    Wednesday, June 8, 2011 5:44 PM
  • Hi, At what stage would this have to be, do you have a sample script?
    Friday, November 15, 2019 1:20 AM
  • What I've done, if I understand your question, is add these two lines in my CS.ini:

    _SMSTSORGNAME='orgname'
    _SMSTSPackageName=%TaskSequenceName% on %Model% named %OSDComputername%

    What this does for me is, during deployment, displays:
    my ORGNAME
    The task I selected (such as Win10 OS Deploy) on Model (ex Latitude 5500) named (the name I gave the pc).

    Example:

    ORGNAME
    "Running Windows 10 OS Basic on Latitude 5414 named MCD123"

    This keeps me on track when I'm testing 4 or 5 different pc's. It says the Task I chose, onto the model of the pc and the name I gave the computer.

    I hope this helps.

    Friday, November 15, 2019 5:16 PM
  • Thanks for your reply. I’m finding that if I set my osdcomputername i.e by [VM-True] Osdcomputername = %mysite%-vm- If update the computername during the deployment, my updated computername isn’t shown, but i.e LON-VM- is displayed during the installation process, when using _smstsorgname= Running %tasksequenceid% on %osdcomputername%
    Friday, November 15, 2019 6:09 PM
  • Not sure, in my Rules I have:

    [Default]
    _SMSTSORGNAME=myorg
    _SMSTSPackageName=%TaskSequenceName% on %Model% named %OSDComputername%

    and of course the rest of my Rules underneath this

    and this displays the Task Name, Model of the PC and the name I typed into the Wizard.


    Friday, November 15, 2019 6:33 PM
  • Hi,

    I've managed to get this working. 

    Place your 

    SMSTSOrgName=Acme IT - Deployment on %OSDComputerName%

    in the BootStrap.ini and remove it from your CustomSettings.ini file

    Update the DeploymentShare and also replace your Boot Image with the newly created one

    Wednesday, November 27, 2019 9:50 AM