You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create or update Run Command on a Windows VM using a SAS URL of a storage blob that contains .ps1 script. Note SAS URL must provide read access to the blob. An expiry time of 24 hours is suggested for SAS URL. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, your SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
37
37
38
-
### Example 2: Create or update Run Command on a VM using a local script file.
38
+
### Example 2: Create or update Run Command on a VM using ScriptLocalPath (local script file).
Create or update Run Command on a VM using pre-existing commandId. Available commandIds can be retrieved using Get-AzVMRunCommandDocument.
61
61
62
-
### Example 5: Create or update Run Command on a VM and stream standard output and standard error messages to output and error Append blobs.
62
+
### Example 5: Create or update Run Command on a VM using OutputBlobUri, ErrorBlobUri to stream standard output and standard error messages to output and error Append blobs.
Create or update Run Command on a VM and stream standard output and standard error messages to output and error Append blobs. Note output and error blobs must be of type AppendBlob and their SAS URLs must provide read, append, create, write access to the blob. An expiry time of 24 hours is suggested for SAS URL. If output or error blob does not exist, a blob of type AppendBlob will be created. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, your SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
68
+
Create or update Run Command on a VM and stream standard output and standard error messages to output and error Append blobs. Note output and error blobs must be of type AppendBlob and their SAS URLs must provide read, append, create, write access to the blob. An expiry time of 24 hours is suggested for SAS URL. If output or error blob does not exist, a blob of type AppendBlob will be created. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
69
69
70
70
### Example 6: Create or update Run Command on a VM, run the Run Command as a different user using RunAsUser and RunAsPassword parameters.
Create or update Run Command on a VM, run the Run Command as a different user using RunAsUser and RunAsPassword parameters. For RunAs to work properly, contact admin of VM and make sure user is added on the VM, user has access to resources accessed by the Run Command (Directories, Files, Network etc.), and in case of Windows VM, 'Secondary Logon' service is running on the VM.
77
77
78
+
### Example 7: Create or update Run Command on a VM instance using Parameter and ProtectedParameter parameters (Public and Protected Parameters to script)
Use ProtectedParameter to pass any sensitive inputs to script such as passwords, keys etc.
91
+
92
+
Windows: Parameters and ProtectedParameters are passed to script as arguments are passed to script and run like this - "myscript.ps1 -publicParam1 publicParam1value -publicParam2 publicParam2value -secret1 secret1value -secret2 secret2value"
93
+
94
+
Linux: Named Parameters and its values are set to environment config, which should be accessible within the .sh script. For Nameless arguments, pass an empty string to name input. Nameless arguments are passed to script and run like this - "myscript.sh publicParam1value publicParam2value secret1value secret2value"
Create or update Run Command on a Windows VMSS VM instance using a SAS URL of a storage blob that contains .ps1 script. Note SAS URL must provide read access to the blob. An expiry time of 24 hours is suggested for SAS URL. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, your SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
36
+
Create or update Run Command on a Windows VMSS VM instance using a SAS URL of a storage blob that contains .ps1 script. Note SAS URL must provide read access to the blob. An expiry time of 24 hours is suggested for SAS URL. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
37
37
38
-
### Example 2: Create or update Run Command on a VMSS VM instance using a local script file.
38
+
### Example 2: Create or update Run Command on a VMSS VM instance using ScriptLocalPath (local script file).
Create or update Run Command on a VMSS VM instance passing the script content directly to -SourceScript parameter. Use ';' to delimit multiple commands.
53
53
54
-
### Example 4: Create or update Run Command on a VMSS VM instance using commandId.
54
+
### Example 4: Create or update Run Command on a VMSS VM instance using SourceCommandId.
Create or update Run Command on a VMSS VM instance using pre-existing commandId. Available commandIds can be retrieved using Get-AzVMRunCommandDocument.
61
61
62
-
### Example 5: Create or update Run Command on a VMSS VM instance and stream standard output and standard error messages to output and error Append blobs.
62
+
### Example 5: Create or update Run Command on a VMSS VM instance using OutputBlobUri, ErrorBlobUri to stream standard output and standard error messages to output and error Append blobs.
Create or update Run Command on a VMSS VM instance and stream standard output and standard error messages to output and error Append blobs. Note output and error blobs must be of type AppendBlob and their SAS URLs must provide read, append, create, write access to the blob. An expiry time of 24 hours is suggested for SAS URL. If output or error blob does not exist, a blob of type AppendBlob will be created. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, your SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
68
+
Create or update Run Command on a VMSS VM instance and stream standard output and standard error messages to output and error Append blobs. Note output and error blobs must be of type AppendBlob and their SAS URLs must provide read, append, create, write access to the blob. An expiry time of 24 hours is suggested for SAS URL. If output or error blob does not exist, a blob of type AppendBlob will be created. SAS URLs can be generated on Azure portal using blob's options , or SAS token using New-AzStorageBlobSASToken. If generating SAS token using New-AzStorageBlobSASToken, SAS URL = base blob URL + "?" + SAS token from New-AzStorageBlobSASToken.
69
69
70
70
### Example 6: Create or update Run Command on a VMSS VM instance, run the Run Command as a different user using RunAsUser and RunAsPassword parameters.
Create or update Run Command on a VMSS VM instance, run the Run Command as a different user using RunAsUser and RunAsPassword parameters. For RunAs to work properly, contact admin of VM and make sure user is added on the VM, user has access to resources accessed by the Run Command (Directories, Files, Network etc.), and in case of Windows VM, 'Secondary Logon' service is running on the VM.
77
77
78
+
### Example 7: Create or update Run Command on a VMSS VM instance using Parameter and ProtectedParameter parameters (Public and Protected Parameters to script)
Use ProtectedParameter to pass any sensitive inputs to script such as passwords, keys etc.
91
+
92
+
Windows: Parameters and ProtectedParameters are passed to script as arguments are passed to script and run like this - "myscript.ps1 -publicParam1 publicParam1value -publicParam2 publicParam2value -secret1 secret1value -secret2 secret2value"
93
+
94
+
Linux: Named Parameters and its values are set to environment config, which should be accessible within the .sh script. For Nameless arguments, pass an empty string to name input. Nameless arguments are passed to script and run like this - "myscript.sh publicParam1value publicParam2value secret1value secret2value"
0 commit comments