Last active
October 24, 2023 12:47
-
-
Save m-gagne/fa5787f048c0d3ab418f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original author Mark Renoden (http://au.linkedin.com/in/markrenoden) | |
Get-AzureVM | | |
ForEach-Object { | |
$vm = $_.name; | |
Write-Output "$vm VM Properties"; | |
Write-Output "---------------"; | |
Format-List -InputObject $_ -Property *; | |
Write-Output "$vm VM Endpoints"; | |
Write-Output "---------------" ; | |
Get-AzureEndpoint -VM $_; | |
Write-Output "$vm Virtual Disks"; | |
Write-Output "---------------" ; | |
Get-AzureDisk | | |
where {$_.AttachedTo.RoleName -eq $vm}; | |
Write-Output "==================================`n" | |
} | | |
Out-File -FilePath ".\myVMs.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment