question

TO-1922 avatar image
0 Votes"
TO-1922 asked TO-1922 commented

automation user

I'd like to start VM automatically using automation user and runbook but dose not work...

  1. create automation user

  2. import "Start Azure V2 VMs" from gallery and create runbook

  3. publish runbook and link to schedule and input "RESOURCEGROUPNAME" and "VMNAME"

What is missing in this procedure?

Thanks,


azure-automation
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cthivierge avatar image
0 Votes"
cthivierge answered TO-1922 commented

Ok, have you created the user in the "Credentials" section in the Automation Account ?
On the left side, under Shared Resources, click on Credentials

Then, create a user...
Name: You decide the name
User Name: It has to be a valid user in your tenant AD
Password: The password of the user account.

When created, you can call this user in your Automation Account script

hth

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Auto boot successfully worked. Thanks for your comments!

0 Votes 0 ·
cthivierge avatar image
0 Votes"
cthivierge answered TO-1922 commented

You have created the automation account as well as the run as account ?

Then you have imported a ps script from the gallery and then you want to run this script with the automation account?

Any error message?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Exception:
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Credential not found. To create this Credential, navigate to the Credentials blade and create a Credential named: AzureCredential. Refer doc for more details (https://docs.microsoft.com/azure/automation/shared-resources/credentials#create-a-new-credential-asset)

I don't know how is the way to create AzureCredential.

Thanks,

0 Votes 0 ·