Jump to content


  • 0
Warrer

Set OSDComputername not working in VBScript20

Question

Hello everyone,

 

Here is my situation. I have a Windows XP in DOM A and SCCM A on which I am advertising a task sequence to deploy W7 and join DOM B with SCCM B.

The migration/deployment scenario works great, no problem on that.

 

My first steps that are done online (not in WinPE) are the following on the XP machine:

-Backup of user settings with USMT

-Backup of user data with Robocopy

-Change the name of the computer locally/AD with a vbscript that also set the OSDComputerName variable with the new value

-Restart on Windows (to validate the renaming)

-Restart in WinPE and go on with the classic deployment (Format, dl of the .wim ...)

 

The thing is that everytime, once the machine is in the new AD and SCCM it still has its old computername. Even though the script changed successfully the name of the computer in the AD and locally of the XP.

 

So I am wondering if this is possible to set the OSDComputerName out of WinPE? And if yes am I doing it right?

Here is the part of my script where I set the variable:

 

dim env

SET env = CreateObject("Microsoft.SMS.TSEnvironment")

env("OSDComputerName") = NewComputerName

 

Where the variable NewComputerName is a variable set before with the new computer name (and it works as it changes the value in the AD).

 

The script is run with an account that as domain admin privileges in DOM A and full access on a DFS in DOM B where the script and a csv file containing all the new values are stored.

 

So, what is wrong??

 

THank you a lot, I have been trying to fix this for days !!

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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...

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.