Shutdown computer

Is it possible with Ignition to run a script that shuts down the local computer in production? The computer is running on Windows 10/11 operating system and on it runs perspective session.
I need this because I don't need the computer on after shutting machine down.

Thank you very much.

You mean the gateway?
You could use system.util.execute - Ignition User Manual 8.1 - Ignition Documentation
to run such commands on the gateway.

This seems like quite bad practice though

I'm assuming that you are asking about a PC acting as a Perpsective HMI on an industrial machine.
Browser security does not allow sessions to control a computer's OS like that. It would be a huge security liability.

Most decent UPS systems have applications that run as a background service that can shutdown a PC after mains power has been off for a predetermined time. There must be someone out there doing a simple power monitor / remote shutdown application.

Powerchute comes to mind.

Pssst! Vision can do this. It's one of the several reasons I strongly recommend Vision for on-machine, permanent HMIs.