Jump to content


Discourage

Established Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Discourage

  1. Hi, Thanks for the feedback, I have run it with a hardcoded value and it does update AD. So the variable is not working, but does work with a runas. The commandline is using a domain admin account to run too. Any ideas?
  2. Hi all, I hope you can help me with a small problem I am having trying to get a vbs to run to update a computer extensionattribute in AD during OSD. I have created 2 variables on the collection that the TS runs against. These are: OSDComputerName and OSDTechnician. OSDComputerNameis simply to name the machine when launching the TS, and OSDTechnician to, hopefully, populate the computer AD account extensionattribute1 with that value. The script I am using works fine in windows, it works fine if I run the script during the TS, by pressing F8 and running the following: runas /user:uk\useraccount /netonly cmd.exe Then in the new window, under these credentials running the script works fine. (The account I actually use is a Domain Admin account). However, if I simply just let the TS run, the script runs but AD never gets updated. (The script is set in the TS to use this domain admin account on a run command line task). Also, this step is after the config manager client install. SMSTS shows this: Active Directory: The attribute syntax specified to the directory service is invalid. Which leads me to believe that it is passing a blank value OR the account\script cannot read the TS variable to pass to the vbs variable. The script I am using is here: set env = CreateObject("Microsoft.SMS.TSEnvironment") OSDTech = env("OSDTechnician") OSDCompName = env("OSDComputerName") ExtAttr = "ExtensionAttribute1" Set objSysInfo = CreateObject("ADSystemInfo") Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName) objComputer.Put ExtAttr, OSDTech objComputer.SetInfo If anyone can help with this, or if anyone has a script that does the same thing that they know works, it would be appreciated. Thanks =)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.