Jump to content


ogeccut

OSDComputerName

Recommended Posts

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

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...