Skip to content

Set OSDComputername not working in VBScript20

Featured Replies

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 !!

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.