Powershell script to connect to Azure rds deployment after deploying from our Azure RDS deployment template. Script will check connectivity to RDWeb and also checks certificates.
Azure RDS Deployment Azure RDS Farm
Script does the following:
** REQUIRES AT LEAST WMF 5.0 AND AZURERM SDK ** Script authenticates to Azure rm queries all resource groups for public ip name gives list of resource groups enumerates public ip of specified resource group downloads certificate from RDWeb adds cert to local machine trusted root store tries to resolve subject name in dns if not the same as public loadbalancer ip address it is added to hosts file
start with -verbose if you need to troubleshoot script
.NOTES
NOTE: to remove certs from all stores Get-ChildItem -Recurse -Path cert:\ -DnsName <%subject%> | Remove-Item
File Name : azure-rm-rdp-post-deployment.ps1
Version : 180721 fix issue where nsg attached to nic didnt have all necessary properties populated
History :
170908 updated commands to remove public ip
170809 checking vm for 3389 and 443 for nsg
170807 fix for $ipAddress.IPAddress
.EXAMPLE
.\azure-rm-rdp-post-deployment.ps1
query azure rm for all resource groups with for all public ips.
.EXAMPLE .\azure-rm-rdp-post-deployment.ps1 -rdWebUrl https://contoso.eastus.cloudapp.azure.com/RDWeb used to bypass Azure enumeration and to copy cert from url to local cert store
.PARAMETER addPublicIp add public ip address and nsg to selected virtual machine
.PARAMETER enumerateSubscriptions to query all subscriptions and not just current one
.PARAMETER noPrompt to not prompt when adding cert to cert store or when modifying hosts file
.PARAMETER rdWebUrl used to pass complete RDWeb url to script to bypass Azure enumeration. will add self-signed cert to cert store.
.PARAMETER resourceManagerName optional parameter to specify Resource Group Name
.PARAMETER publicIpAddressName optional parameter to override ip resource name public ip address
.PARAMETER update optional parameter to check for updated script from github