#!/bin/bash

# Generate the random value
timestamp=$(date +%s)
random_suffix=$(openssl rand -base64 8 | tr -dc 'A-Z0-9' | head -c 8)
#random_suffix=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 8 | head -n 1)
random_value="ARM.WIN11VM-${timestamp}-${random_suffix}"

# Get someIDnumber 
# insert your deployed VM UUID.
someIDnumber={943a8e15-47d2-4708-98c7-5af8df922d6e}

# Use the random value in prlctl
prlctl set "$someIDnumber" --smbios-serial-number "$random_value"