Virtual Machine Run Commands - List
Listák egy adott helyen lévő előfizetés összes elérhető futtatási parancsát.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands?api-version=2024-03-01
URI-paraméterek
Name | In | Kötelező | Típus | Description |
---|---|---|---|---|
location
|
path | True |
string |
A futtatási parancsok lekérdezett helye. Regex pattern: |
subscription
|
path | True |
string |
Az előfizetés hitelesítő adatai, amelyek egyedileg azonosítják a Microsoft Azure-előfizetést. Az előfizetés-azonosító az URI részét képezi minden szolgáltatáshíváshoz. |
api-version
|
query | True |
string |
Client API-verzió. |
Válaszok
Name | Típus | Description |
---|---|---|
200 OK |
OK Media Types: "application/json", "text/json" |
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | felhasználói fiók megszemélyesítése |
Példák
VirtualMachineRunCommandList
Sample Request
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Compute/locations/SoutheastAsia/runCommands?api-version=2024-03-01
Sample Response
{
"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."
}
]
}
Definíciók
Name | Description |
---|---|
Operating |
Az operációs rendszer típusa. |
Run |
A parancsfuttatási metaadatok tulajdonságait ismerteti. |
Run |
A Virtuális gép listázása művelet válasza. |
OperatingSystemTypes
Az operációs rendszer típusa.
Name | Típus | Description |
---|---|---|
Linux |
string |
|
Windows |
string |
RunCommandDocumentBase
A parancsfuttatási metaadatok tulajdonságait ismerteti.
Name | Típus | Description |
---|---|---|
$schema |
string |
A virtuális gép futtatja a parancssémát. |
description |
string |
A virtuális gép futtatja a parancs leírását. |
id |
string |
A virtuális gép futtatási parancsazonosítója. |
label |
string |
A virtuális gép futtatja a parancscímkét. |
osType |
Az operációs rendszer típusa. |
RunCommandListResult
A Virtuális gép listázása művelet válasza.
Name | Típus | Description |
---|---|---|
nextLink |
string |
A futtatási parancsok következő oldalának lekéréséhez tartozó URI. Ezzel hívja meg a ListNext() parancsot a futtatási parancsok következő oldalának lekéréséhez. |
value |
A virtuális gép futtatási parancsainak listája. |