Jump to content


coolslim54

SCCM OSD Computer Name Change

Recommended Posts

On 8/28/2016 at 7:14 PM, tregelen said:

This should work (I haven't tested it because im not at work atm)


$var = New-Object -ComObject Microsoft.SMS.TSEnvironment
$OSDComputerName = $var.Value("OSDComputerName")
$var.Value("OSDComputerName") = ($OSDComputerName).Replace("TW7", "TW10")

Hi i am trying to do this same tasks except for different computer names

 

i need help .. so am i taking the code below and creating a package w/ or without program? Do i save the code as .ps1 then in my TS I  add-->general-->Powershell Script? choose the package i created the script name below as .ps1 and choose bypass ?  in what stage of the TS do i run this as i cannot get it to work ?   Help would be greatly appreciated in getting this working.  Also is there another way i can create a program or package per se and then just deploy it to a Lab already in production that just needs thier names changed from like H206 to H205  the room number has changed in the computer names.

$var = New-Object -ComObject Microsoft.SMS.TSEnvironment
$OSDComputerName = $var.Value("OSDComputerName")
$var.Value("OSDComputerName") = ($OSDComputerName).Replace("TW7", "TW10")

Share this post


Link to post
Share on other sites

20 hours ago, djm1k0 said:

Hi i am trying to do this same tasks except for different computer names

 

i need help .. so am i taking the code below and creating a package w/ or without program? Do i save the code as .ps1 then in my TS I  add-->general-->Powershell Script? choose the package i created the script name below as .ps1 and choose bypass ?  in what stage of the TS do i run this as i cannot get it to work ?   Help would be greatly appreciated in getting this working.  Also is there another way i can create a program or package per se and then just deploy it to a Lab already in production that just needs thier names changed from like H206 to H205  the room number has changed in the computer names.


$var = New-Object -ComObject Microsoft.SMS.TSEnvironment
$OSDComputerName = $var.Value("OSDComputerName")
$var.Value("OSDComputerName") = ($OSDComputerName).Replace("TW7", "TW10")

I knew this was a super old post, but hoping to bring it back to life. BUMP

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

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.