Description
Description
Set-AzVMRunCommand, Set-AzVmssVMRunCommand cmdlets (RunCommand v2) are successors of cmdlets Invoke-AzVMRunCommand, Invoke-AzVmssVMRunCommand (RunCommand v1). Cmdlets Invoke-AzVMRunCommand, Invoke-AzVmssVMRunCommand support -ScriptPath parameter using which user can point to a local script file (.ps1 file in case of Windows, .sh file in case of Linux) on the client machine that issues RunCommand. This script file's content would be passed as value to -ScriptString in cmdlet client code I believe. Looks like somehow this parameter was not included for v2 version of cmdlets: Set-AzVMRunCommand, Set-AzVmssVMRunCommand. I'm not sure what may have caused this.
However, v2 cmdlets should support a "-ScriptPath" parameter to not break user's Run Command experience and be a real super set of v1 cmdlets. May be use "-LocalScriptFilePath" parameter for v2 cmdlets Set-AzVMRunCommand, Set-AzVmssVMRunCommand to avoid confusion with already existing -ScriptUri ?
Issue script & Debug output
Local script path parameter missing from Set-AzVMRunCommand, Set-AzVmssVMRunCommand RunCommand v2 cmdlets
https://docs.microsoft.com/en-us/powershell/module/az.compute/set-azvmruncommand?view=azps-8.3.0
https://docs.microsoft.com/en-us/powershell/module/az.compute/set-azvmssvmruncommand?view=azps-8.3.0
while the the below RunCommand v1 cmdlets have it:
https://docs.microsoft.com/en-us/powershell/module/az.compute/invoke-azvmruncommand?view=azps-8.3.0
https://docs.microsoft.com/en-us/powershell/module/az.compute/invoke-azvmssvmruncommand?view=azps-8.3.0
Environment data
Not applicable
Module versions
Az module version 8.3.0
Error output
No error. Parameter is missing in RunCommand v2 cmdlets.