Last active
September 20, 2018 14:33
-
-
Save nordineb/01d69b63d2daf01e61b116bee607c6b8 to your computer and use it in GitHub Desktop.
Azure Instance Metadata service
This file contains hidden or 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
# Get all metadata | |
curl -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2017-04-02" | |
# Get all network metadata | |
curl -H Metadata:true "http://169.254.169.254/metadata/instance/network?api-version=2017-04-02" | |
# Get public ip only | |
curl -H Metadata:true "http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress/0/publicIpAddress?api-version=2017-04-02&format=text" | |
#unique VM id | |
curl -H Metadata:true "http://169.254.169.254/metadata/instance/compute/vmId?api-version=2017-04-02&format=text" | |
Invoke-RestMethod -Headers @{"Metadata"="true"} -URI http://169.254.169.254/metadata/instance?api-version=2017-04-02 -Method get | |
Invoke-RestMethod -Headers @{"Metadata"="true"} -URI http://169.254.169.254/metadata/instance/network?api-version=2017-04-02 -Method get |
Join a RedHat Linux VM to an Azure Active Directory Domain Service
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/join-redhat-linux-vm-to-azure-active-directory-domain-service
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following data categories are available through the Instance Metadata Service: