

$publicIpAddress = Get-AzureRmPublicIpAddress -ResourceGroupName $publicIpAddressResource. $publicIpAddressResource = Get-AzureRmResource -ResourceId $PublicIpAddressId Where-Object -Property 'Primary' -EQ -Value $true | ResourceGroupName -Name $primaryNetworkInterfaceResource. $primaryNetworkInterface = Get-AzureRmNetworkInterface -ResourceGroupName $primaryNetworkInterfaceResource. $primaryNetworkInterfaceResource = Get-AzureRmResource -ResourceId $primaryNetworkInterfaceId $primaryNetworkInterfaceId = GetPrimaryNetworkInterfaceId -VM $vm Fqdn -ne $null ) is not assigned public IP address.' -f $vm. # Create a new server element as child of the group element. $groupElm = CreateGroupElement -XmlDoc $xmlDoc -GroupName $group. # Create a new group element as child of the file element.

GetRdpConnectionInfo -ResourceGroupName $ResourceGroupName |

# Retrieve the RDP connection informations and build the XML elements. $xmlDoc = CreateRdgFileXmlDoc -RootGroupName $RootGroupName Path -ChildPath 'AzureVMConnection.rdg' ) , $FilePath = ( Join-Path -Path ( Get-Location ). Import-Module -Name ( Join-Path -Path $PSScriptRoot -ChildPath '1' -Resolve )
