If you work in Azure these two functions are very valuable additions to your library. Note: This majority of this code is copied from the reference below. I added Gateway Address to the Network Routes along with DNS Reference: http://blog.kloud.com.au/2014/11/11/get-azure-virtual-networks-with-powershell/