ogeccut Posted November 17, 2011 Report post Posted November 17, 2011 I am trying to find a way to query an OU and find next available object "001, 002, 003...." and assign this value to a %Computername% I see that there is a thread with some examples http://social.technet.microsoft.com/Forums/en-US/configmgrosd/thread/39eaa0e9-1b24-4123-a072-2a01ed1e7e6b#d73d7914-c8c3-4851-be31-f435cbcc2ebf, but not able to get it to work. Has any one done something similar with naming workstations? Is there a way to assign a value to a OSDComputerName from the script in the TS or is has to be done from Customsetting.ini file from integrated MDT? Can i add "Set TS variable" task and in the "ts variable" set "OSDComputerName=????" Is there a way to assign an output from the script? Quote Share this post Link to post Share on other sites More sharing options...
0 Peter33 Posted November 18, 2011 Report post Posted November 18, 2011 You can set the variable in a script by using env("OSDComputerName") = computername, and yes you can also set the name by setting a task sequnce variable. Best practice for naming computers is using the serial number of the client machine. Quote Share this post Link to post Share on other sites More sharing options...
0 ogeccut Posted November 30, 2011 Report post Posted November 30, 2011 Thank you for the answer. I do have a working script. But to my understanding i need to assign a value to %OSDComputerName% still in WinPE stage. I need to run my script as a user to make a connection to AD. But you can not run a script as a user in WinPE. Is there any way around it? Thank you. Quote Share this post Link to post Share on other sites More sharing options...
0 Peter33 Posted November 30, 2011 Report post Posted November 30, 2011 First you need to add ADSI support to your PE. Then you can provide the credentials for the AD logon in the script itself, or just chose the "run command line" in the task sequence, where you can sepcify a user account. Put the script in the MDT script folder and run "use toolkit pakage" as the first step in your TS. In the command line just call the script from the MDT script folder. Quote Share this post Link to post Share on other sites More sharing options...
I am trying to find a way to query an OU and find next available object "001, 002, 003...." and assign this value to a %Computername%
I see that there is a thread with some examples http://social.technet.microsoft.com/Forums/en-US/configmgrosd/thread/39eaa0e9-1b24-4123-a072-2a01ed1e7e6b#d73d7914-c8c3-4851-be31-f435cbcc2ebf, but not able to get it to work.
Has any one done something similar with naming workstations?
Is there a way to assign a value to a OSDComputerName from the script in the TS or is has to be done from Customsetting.ini file from integrated MDT?
Can i add "Set TS variable" task and in the "ts variable" set "OSDComputerName=????"
Is there a way to assign an output from the script?
Share this post
Link to post
Share on other sites