 VMM module already loaded and the console connected to the current VMM instance. In the PowerShell console execute the script. 39. In the PowerShell console, run the following cmdlet: Get-SCNetworkService -Name "HNVGateway2" Read-SCNetworkService 40. Once the script is complete, run the following PowerShell script to configure HNVGateway2: #Get the VMM Run As account $credentials = Get-SCRunAsAccount -Name "VMM Agent Run As" #Get the Windows Server Gateway Provider $configurationProvider = Get-SCConfigurationProvider -Name "Microsoft Windows Server Gateway Provider" #Get the current HNVGateway2 configuration $networkService = Get-SCNetworkService -Name "HNVGateway2" #Get the External network adapter $frontEndAdapter = $networkService.NetworkAdapters ? {$_. .AdapterName -eq "External"} #Get the External (NAT) logical network Chapter 5 $logicalNetwork = Get-SCLogicalNetwork -Name "External (NAT)" #Get the appropriate site $frontEnd = Get-SCLogicalNetworkDefinition -Name "External (NAT)_0" -LogicalNetwork $logicalNetwork #Define the Front End Connection Add-SCNetworkConnection -Name "Front End" - LogicalNetworkDefinition $frontEnd -Service $networkService -NetworkAdapter $frontEndAdapter - ConnectionType "FrontEnd" -RunAsynchronously #Get the TenantNetworks network adapter $backEndAdapter = networkService.NetworkAdapters ?{$_.AdapterName -eq "TenantNetworks"] #Get the Provider Address network $logicalNetwork = Get-SCLogicalNetwork -Name "Provider Address" #Get the appropriate site $backEnd = Get-SCLogicalNetworkDefinition -Name "Provider Address_0" -LogicalNetwork $logicalNetwork #Define the Back End Connection Add-SCNetworkConnection -Name "Back End" - LogicalNetworkDefinition $backEnd -Service $networkService -NetworkAdapter $backEndAdapter - ConnectionType "BackEnd" -RunAsynchronously #Update the Network Service Set-SCNetworkService -NetworkService $networkService -Name "HNVGateway2" -Description 11 11 -ConnectionString "VMHost=HNVG2.ad.demo.com;GatewayVM=HNVGateway2.ad.demo.c ; BackendSwitch=TenantNetwork;Direc