Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Startup Script on Windows GCE - Where is it logged?

I'm wondering where startup script logging occurs (if it does automatically) on the MS Windows Images provided by Google for the GCE. The documentation is pretty clear about logging for the Linux images, but doesn't indicate anything for Windows.

Thanks in advance!

-Ben

like image 592
Ben Finkel Avatar asked Oct 17 '14 14:10

Ben Finkel


1 Answers

After a practical test, here is what I can say

-GCE stores the script in the following location

C:\Program Files\Google\Compute Engine\sysprep\startup_script.ps1

-The script is executed using a task in the Task Scheduler, root folder, named: GCEStartup

-The script is passed as a command-line parameter to powershell.exe, meaning there is no automatic logging.

Answer: You need to implement logging in your script manually. The only output is the basic Task Scheduler logs.

like image 171
Ben Finkel Avatar answered Sep 22 '22 06:09

Ben Finkel