Set Windows Scheduler to reset mongoDB password on first boot

Visits: 857

This task is run at every boot, password reset is set before boot, by reset-password-to-prep-mongo-AMI.ps1

Go Windows Scheduler

Trigger at startup, the password is only reset if it isn’t already the Instance ID.

I have been doing this Windows Scheduler task for Windows Server 2019, Apparently something has changed. DO NOT set the bottom field of configure for: AS SVR 2019!!!!! strangely enough you need to select “Windows 7”. Additionally, you need to choose teh SYSTEM User to run the task!  Perhaps if you’re not creating an AMI that will have a different System Name, it might work, no idea. so follow the pic right below

 

 

Action is to run  -noprofile -executionpolicy bypass -file C:\Windows\Charming-Scripts\reset-passwd-4-mong-and-jscript.ps1

 

 

Conditions

 

settings