Skip to content

Rename VM Hyper V

Featured Replies

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

Try this

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

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.