Jump to content


Sign in to follow this  
Alejandro Suarez

Rename VM Hyper V

Recommended Posts

I need help I'm new on SCCM. I need to rename a Hyper V virtual machine. i'm using this settings on customsetting.ini TS fails. task sequence error 0x80220005

when i use laptop or desktop works perfect but fails when deploying Hyper V VM

[Settings]
Priority=ByLaptop, ByDesktop, ByVM, Default
Properties=MyCustomProperty

[ByLaptop]
subsection=Laptop-%IsLaptop%

[Laptop-True]
OSDComputerName=LT-%SerialNumber%
MachineObjectOU=OU=Laptops,OU=USA,OU=Sites,DC=mydomain,DC=com

[ByDesktop]
subsection=Desktop-%IsDesktop%

[Desktop-True]
OSDComputerName=DT-%SerialNumber%
MachineObjectOU=OU=Desktops,OU=USA,OU=Sites,DC=mydomain,DC=com

[ByVM]
subsection=VM-%IsVM%

[VM-True]
OSDComputerName=VM-#Right("%SerialNumber%",8)#
MachineObjectOU=OU=Virtual_Machines,OU=USA,OU=Sites,DC=mydomain,DC=com

I have tried also this : OSDComputerName=VM-#Right(Replace(Replace(oEnvironment.Item("SerialNumber")," ",""),"-",""),8)#

[Default]
OSInstall=Y
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES

Edited by Alejandro Suarez

Share this post


Link to post
Share on other sites

Try this

OSDComputerName=VM-#Left("#Replace("#Replace("%SERIALNUMBER%"," ","")#","-","")#",12)#

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...
Sign in to follow this  

×
×
  • Create New...