Azure / Azure/azure-powershell

Get-AzureRmSqlServer cmdlet - Should provide an "Client IP Address" property.

Open
#5,744 6 comments 0 reactions 1 assignee Assigned to @jaredmoo View on GitHub
act-codegen-extensibility-squad feature-request SQL
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

Not getting the **_Azure SQL Client IP_** in PowerShell its been bothering me since the Azure Classics, and it still an issue in the AzureRM Sql cmdlets.

I just can't find this information. It force me to use the Azure Portal disrupting my script automation steps.

Of course, If there's a cmdlet that can provide me this information, then let me know. I have searched on "How to get the AzureRM SQL Client IP Address?", but the only place I found it is in the Azure portal.

![azuresqlserver_01_2018-03-14_17-47-12](https://user-images.githubusercontent.com/19892435/37433040-c8ad1666-27b0-11e8-97ba-4e02aaaa2bb3.jpg)

I don't understand! If the portal has the ability to "**_Add Client Id_**" to the Firewall Rule, then why not make available in the New-AzureRmSqlServerFirewallRule Cmdlet.

![azuresqlserver_02_2018-03-14_17-47-12](https://user-images.githubusercontent.com/19892435/37433166-361872f4-27b1-11e8-8815-66d9f79381f5.jpg)

![azuresqlserver_03_2018-03-14_17-47-12](https://user-images.githubusercontent.com/19892435/37433190-4c0030d4-27b1-11e8-9b43-19ee43275bf8.jpg)

It will work if I have an ClientIpAddress property accessible at least in the **Get-AzureRmSqlServer** cmdlet.
This will make it much easier to create an Azure Sql Server and then add the firewall rule using the "_**ClientIpAddress**_" given to the new SqlServer

![azuresqlserver_05_2018-03-14_17-47-12](https://user-images.githubusercontent.com/19892435/37433194-5128861a-27b1-11e8-8560-c95f23385769.jpg)

### Script/Steps for Reproduction

The "**_Client IP Address_**" should be included after creating the Azure SQL asset:
```powershell
## - Providing existing AzureRmSqlServer information:
Get-AzureRmSqlServer -ResourceGroupName azResourceEast01

## - Providing existing AzureRmSqlServer Firewall information:
Get-AzureRmSqlServerFirewallRule -ServerName azsqls01 -ResourceGroupName azResourceEast01
```

### Module Version

```powershell
PS [98] > Get-Module -ListAvailable AzureRM | Select Name, Version

Name Version
---- -------
AzureRM 5.4.1

PS [105] > Get-Module -ListAvailable AzureRM.Sql | Select Name, Version

Name Version
---- -------
AzureRM.Sql 4.2.0
```

### Environment Data

```powershell
PS [69] > $PSVersionTable

Name Value
---- -----
PSVersion 5.1.17120.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17120.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

### Debug Output

```

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.