Compartilhar via


PowerShell Azure - Invoke-AzureRmVMRunCommand

Invoke-AzureRmVMRunCommand has a parameter -CommandId which the single example shows as
-CommandId 'RunPowerShellScript' -ScriptPath 'sample.ps1'

but the question that raises is - what other values can I give?

A colleague showed me how to get the list of various CommandId values:
Get-AzureRmVMRunCommandDocument -Location AustraliaEast

EnableRemotePS - Configure the machine to enable remote PowerShell. (Windows)
Ipconfig - List IP configuration (Windows)
ifconfig - List network configuration (Linux)
RunPowerShellScript - Executes a PowerShell script (Windows)
RunShellScript - Executes a Linux shell script
EnableAdminAccount - Enable administrator account (Windows)
ResetAccountPassword - Reset built-in Administrator account password (Windows)
RDPSettings - Verify RDP Listener Settings (Windows)
SetRDPPort - Set Remote Desktop port (Windows)
ResetRDPCert - Restore RDP Authentication mode to defaults (Windows)

Comments