djustin7
Contributor
Contributor

HCX migration extended options - Personalization script

I'm looking how can my .\ps1 script located in c:\ can be triggered after the vm is migrated.

We have below sample personalization script in here : https://hcx.design/2021/02/05/vm-migration-series-guest-customization-for-hcx-bulk-migrations/

We do not have any more details, and  I'm not sure how to use this option.

Sample Personalization Scripts

For Windows based systems:

@echo off 
if "%1%" == "precustomization" ( 
  echo "do pre-customization tasks"
) else if "%1%" == "postcustomization" ( 
  echo "do post-customization tasks"
)

 Thanks for your inputs.

Labels (1)
0 Kudos
1 Reply
aggarwalvinay31
Enthusiast
Enthusiast

Gabe has listed out few methods to run Powershell script in HCX in same article -

VM Migration Series – Guest Customization for HCX Bulk Migrations – HCX ⦿ DESIGN

@echo off 
if "%1%" == "precustomization" (
echo "do pre-customization tasks"
)
else if "%1%" == "postcustomization" (
powershell.exe -File F:\createFile.ps1
)

This example is at the end of article. Have you tried this option?