{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/460","labels_url":"https://api.github.com/repos/Azure/azure-powershell/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-powershell/issues/460/comments","events_url":"https://api.github.com/repos/Azure/azure-powershell/issues/460/events","html_url":"https://github.com/Azure/azure-powershell/issues/460","id":84458746,"number":460,"title":"'Set-AzureApplicationGatewayConfig' throws 'Object reference not set to an instance of an object' error","user":{"login":"romangromov","id":1655573,"avatar_url":"https://avatars.githubusercontent.com/u/1655573?v=3","gravatar_id":"","url":"https://api.github.com/users/romangromov","html_url":"https://github.com/romangromov","followers_url":"https://api.github.com/users/romangromov/followers","following_url":"https://api.github.com/users/romangromov/following{/other_user}","gists_url":"https://api.github.com/users/romangromov/gists{/gist_id}","starred_url":"https://api.github.com/users/romangromov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romangromov/subscriptions","organizations_url":"https://api.github.com/users/romangromov/orgs","repos_url":"https://api.github.com/users/romangromov/repos","events_url":"https://api.github.com/users/romangromov/events{/privacy}","received_events_url":"https://api.github.com/users/romangromov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-03T09:28:21Z","updated_at":"2015-06-03T09:28:21Z","closed_at":null,"body":"Used version: 0.9.2,  [msi installer](https://github.com/Azure/azure-powershell/releases/download/0.9.2-May2015/azure-powershell.0.9.2.msi)\r\n\r\nCmdlet: `Get-AzureApplicationGatewayConfig -Name AppGwTest -ExportToFile \"D:\\config.xml\"`\r\n\r\nOutput:\r\n```powershell\r\n\r\nPS C:\\> Get-AzureApplicationGateway -Name AppGwTest\r\nVERBOSE: 12:05:57 PM - Begin Operation: Get-AzureApplicationGateway\r\nVERBOSE: 12:05:59 PM - Completed Operation: Get-AzureApplicationGateway\r\n\r\n\r\nName          : AppGwTest\r\nDescription   :\r\nVnetName      : VnetForAssociation\r\nSubnets       : {Subnet-1}\r\nInstanceCount : 2\r\nGatewaySize   : Medium\r\nState         : Stopped\r\nVirtualIPs    : {}\r\nDnsName       :\r\n```\r\n\r\n```powershell\r\nPS C:\\> $appgwconfig = New-Object Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationGateway.Model.App\r\nlicationGatewayConfiguration\r\nPS C:\\> $pool = New-Object Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationGateway.Model.BackendAdd\r\nressPool\r\nPS C:\\> $servers = New-Object Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationGateway.Model.Backend\r\nServerCollection\r\nPS C:\\> $servers.Add(\"10.0.0.1\")\r\nPS C:\\> $pool.BackendServers = $servers\r\nPS C:\\> $pool.Name = \"pool1\"\r\nPS C:\\> $appgwconfig.BackendAddressPools = New-Object \"System.Collections.Generic.List[Microsoft.WindowsAzure.Commands.S\r\nerviceManagement.Network.ApplicationGateway.Model.BackendAddressPool]\"\r\nPS C:\\> $appgwconfig.BackendAddressPools.Add($pool)\r\nPS C:\\> Set-AzureApplicationGatewayConfig -Name AppGwTest -Config $appgwconfig\r\nObject reference not set to an instance of an object.\r\nAt line:1 char:1\r\n+ Set-AzureApplicationGatewayConfig -Name AppGwTest -Config $appgwconfig\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : OperationStopped: (:) [], NullReferenceException\r\n    + FullyQualifiedErrorId : System.NullReferenceException\r\n```"}}