question

Techno-SS-1948 avatar image
0 Votes"
Techno-SS-1948 asked Techno-SS-1948 edited

Powershell - AZURE list number of linux servers

Hi,

I wish to list number of linux VM's only, their Public IP in a given subscription, using powershel.


Get-AzurePublicAddress | select name,ipaddress | export-csv C:\temp\listoflinuxServers.csv

Another one I tried, which list the servers but the public ipaddress and format is the issue.
I want to output the list of VM's and display in a single line i.e,

Name of VM, resource group name, public ip address etc.

Get-AzVM | Where-Object {$_.StorageProfile.OSDisk.OSType -eq "Linux"} | Select-Object Name,ipaddress,ostype,resourcegroupname,location


Any help is highly appreciated.

Thank you



windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers