This article has not been completed yet. However, it may already contain   helpful Information and therefore it has been published at this stage.

Tested Prerequistes:

  • Running Azure Stack HCI Cluster
  • Deployed Azure Resource Bridge
  • Global Admin Role

PowerShell - Way:

Update & Install required Tools / Modules:

# On each Node

Install-PackageProvider -Name NuGet -Force 
Install-Module -Name PowershellGet -Force -Confirm:$false -SkipPublisherCheck

Restart-Computer -Force
# On each Node

Install-Module -Name Moc -Repository PSGallery -AcceptLicense -Force
Initialize-MocNode

Install-Module -Name ArcHci -Force -Confirm:$false -SkipPublisherCheck -AcceptLicense

Restart-Computer -Force
# On each Node

# Install az cli on every Node in the Cluster
    
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi
Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
    
# Cleanup
rm .\AzureCLI.msi

Restart-Computer -Force

Create VNet

Get-VmSwitch -SwitchType External
Get-VmSwitch -SwitchType External

$vlanID=<vLAN identifier for Arc VMs. A 0 value means there is no vLan ID.> 
$vnetName=<user provided name of virtual network>

New-MocGroup -name "Default_Group" -location "MocLocation"

New-MocVirtualNetwork -name "$vnetName" -group "Default_Group" -tags @{'VSwitch-Name' = "$vswitchName"} -vlanID $vlanID

az azurestackhci virtualnetwork create --subscription $subscription --resource-group $resource_group --extended-location name="/subscriptions/$subscription/resourceGroups/$resource_group/providers/Microsoft.ExtendedLocation/customLocations/$customloc_name" type="CustomLocation" --location $Location --network-type "Transparent" --name $vnetName --vlan $vlanID

Rferences:

Create virtual networks (preview) - Azure Stack HCI
Learn how to create virtual networks (preview).