Virtual Machine Run Commands - List
Wyświetla listę wszystkich dostępnych poleceń uruchamiania dla subskrypcji w lokalizacji.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands?api-version=2024-07-01
Parametry identyfikatora URI
Nazwa | W | Wymagane | Typ | Opis |
---|---|---|---|---|
location
|
path | True |
string pattern: ^[-\w\._]+$ |
Lokalizacja, w której są wykonywane zapytania dotyczące poleceń uruchamiania. |
subscription
|
path | True |
string |
Poświadczenia subskrypcji, które jednoznacznie identyfikują subskrypcję platformy Microsoft Azure. Identyfikator subskrypcji stanowi część identyfikatora URI dla każdego wywołania usługi. |
api-version
|
query | True |
string |
Wersja interfejsu API klienta. |
Odpowiedzi
Nazwa | Typ | Opis |
---|---|---|
200 OK |
OK Media Types: "application/json", "text/json" |
Zabezpieczenia
azure_auth
Przepływ protokołu OAuth2 usługi Azure Active Directory
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa | Opis |
---|---|
user_impersonation | personifikacja konta użytkownika |
Przykłady
VirtualMachineRunCommandList
Przykładowe żądanie
Przykładowa odpowiedź
{
"value": [
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "EnableRemotePS",
"osType": "Windows",
"label": "Enable remote PowerShell",
"description": "Configure the machine to enable remote PowerShell."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "IPConfig",
"osType": "Windows",
"label": "List IP configuration",
"description": "Shows detailed information for the IP address, subnet mask and default gateway for each adapter bound to TCP/IP."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RunPowerShellScript",
"osType": "Windows",
"label": "Executes a PowerShell script",
"description": "Custom multiline PowerShell script should be defined in script property. Optional parameters can be set in parameters property."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RunShellScript",
"osType": "Linux",
"label": "Executes a Linux shell script",
"description": "Custom multiline shell script should be defined in script property. Optional parameters can be set in parameters property."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ifconfig",
"osType": "Linux",
"label": "List network configuration",
"description": "Get the configuration of all network interfaces."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "EnableAdminAccount",
"osType": "Windows",
"label": "Enable administrator account",
"description": "Checks if the local Administrator account is disabled, and if so enables it."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ResetAccountPassword",
"osType": "Windows",
"label": "Reset built-in Administrator account password",
"description": "Reset built-in Administrator account password."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RDPSettings",
"osType": "Windows",
"label": "Verify RDP Listener Settings",
"description": "Checks registry settings and domain policy settings. Suggests policy actions if machine is part of a domain or modifies the settings to default values."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "SetRDPPort",
"osType": "Windows",
"label": "Set Remote Desktop port",
"description": "Sets the default or user specified port number for Remote Desktop connections. Enables firewall rule for inbound access to the port."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ResetRDPCert",
"osType": "Windows",
"label": "Restore RDP Authentication mode to defaults",
"description": "Removes the SSL certificate tied to the RDP listener and restores the RDP listerner security to default. Use this script if you see any issues with the certificate."
}
]
}
Definicje
Nazwa | Opis |
---|---|
Operating |
Typ systemu operacyjnego. |
Run |
Opisuje właściwości metadanych Polecenia uruchamiania. |
Run |
Odpowiedź na operację Lista maszyn wirtualnych. |
OperatingSystemTypes
Typ systemu operacyjnego.
Wartość | Opis |
---|---|
Linux | |
Windows |
RunCommandDocumentBase
Opisuje właściwości metadanych Polecenia uruchamiania.
Nazwa | Typ | Opis |
---|---|---|
$schema |
string |
Schemat polecenia uruchomienia maszyny wirtualnej. |
description |
string |
Opis polecenia uruchomienia maszyny wirtualnej. |
id |
string |
Identyfikator polecenia uruchomienia maszyny wirtualnej. |
label |
string |
Etykieta polecenia uruchamiania maszyny wirtualnej. |
osType |
Typ systemu operacyjnego. |
RunCommandListResult
Odpowiedź na operację Lista maszyn wirtualnych.
Nazwa | Typ | Opis |
---|---|---|
nextLink |
string |
Identyfikator URI do pobrania następnej strony poleceń uruchamiania. Wywołaj metodę ListNext(), aby pobrać następną stronę poleceń uruchamiania. |
value |
Lista poleceń uruchamiania maszyny wirtualnej. |