The Set-AzVMAccessExtension cmdlet adds the Virtual Machine Access (VMAccess) Virtual Machine VMAccess Extension to a virtual machine. VMAccess Extension can be used to set a temporary password and this should be immediately changed it after logging into the machine. This is not supported on Windows Domain Controllers.
This command adds a VMAccess extension for the virtual machine named VirtualMachine07 in ResourceGroup11.
The command specifies the name and type handler version for VMAccess.
Example 2
Adds the VMAccess extension to a virtual machine. (autogenerated)
Specifies the user name and password for the virtual machine as a PSCredential object.
If you type a different name than the current local administrator account on your VM, the VMAccess extension will add a local administrator account with that name, and assign your specified password to that account. If the local administrator account on your VM exists, it will reset the password and if the account is disabled, the VMAccess extension enables it.
To obtain a credential, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
The Set-AzVMAccessExtension cmdlet adds the Virtual Machine Access (VMAccess) Virtual Machine VMAccess Extension to a virtual machine. VMAccess Extension can be used to set a temporary password and this should be immediately changed it after logging into the machine. This is not supported on Windows Domain Controllers.
Indicates that this cmdlet forces a rerun of the same extension configuration on the virtual machine without uninstalling and reinstalling the extension.
The value can be any string different from the current value.
If forceUpdateTag is not changed, updates to public or protected settings are still applied by the handler.
Starts the operation and returns immediately, before the operation is completed. In order to determine if the operation has successfully been completed, use some other mechanism.
Specifies the version of the extension to use for this virtual machine.
To obtain the version, run the Get-AzVMExtensionImage cmdlet with a value of Microsoft.Compute for the PublisherName parameter and VMAccessAgent for the Type parameter. The typeHandlerVersion must be 2.0 or greater, as version 1 is deprecated.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.