Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 检索Azure web应用程序的每个IP地址_Powershell_Azure - Fatal编程技术网

Powershell 检索Azure web应用程序的每个IP地址

Powershell 检索Azure web应用程序的每个IP地址,powershell,azure,Powershell,Azure,我希望单独检索的每个IP地址,因为运行以下Cmdlet时: $web = (Get-AzureRmWebApp -Name forthesakeoftest).OutboundIpAddresses 我得到以下结果: 104.40.191.174,23.100.3.112,23.97.216.155,23.97.186.126,23.97.184.187 所有IP都在同一条线上。 如何分别检索它们?这似乎适用于您的案例。这不是一个很好的解决方案,但它完成了任务 $web = (Get-Az

我希望单独检索的每个IP地址,因为运行以下Cmdlet时:

$web =  (Get-AzureRmWebApp -Name forthesakeoftest).OutboundIpAddresses
我得到以下结果: 104.40.191.174,23.100.3.112,23.97.216.155,23.97.186.126,23.97.184.187 所有IP都在同一条线上。
如何分别检索它们?

这似乎适用于您的案例。这不是一个很好的解决方案,但它完成了任务

$web =  (Get-AzureRmWebApp -Name forthesakeoftest).OutboundIpAddresses
$formattedWeb = $web.Split("{,}")
(Get-AzureRmWebApp-Name“任意名称”).OutboundIPAddresss.Split(“,”)


将为您提供一个IP地址数组,然后您可以对其进行处理。

$web.GetType()
返回什么?它返回的基本类型是system.object