Nuestras marcas

Impact-Company-Logo-English Black-01-177x54

Web de Schneider Electric España

Bienvenido a nuestra web
		
¿Cómo podemos ayudarle hoy?
How to trigger a PowerShell script using PowerChute Network Shutdown?
Issue:
Would like PowerChute Network Shutdown to trigger a Windows executable.

Product:
PowerChute Network Shutdown

Environment:
All supported Windows OS running PowerChute Network Shutdown version 4.4.x and above.

Solution:

To run a Windows PowerShell script from PowerChute, you must create two scripts: a .bat or .cmd file and a PowerShell script .ps1. We recommend using Notepad ++ to avoid saving the files as .txt in Notepad or Wordpad.

PowerChute will run a .bat, so we created Trigger.bat. That file consists of
"%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Unrestricted -NoProfile -NonInteractive C:'\Temp\MyPowerShellScript.ps1'

You will need to verify or change the path to powershell.exe and change the path to the MyPowerShellScript.ps1. Also, all command files and script PowerChute Network Shutdown 4.4.x and above will run must be stored in

C:\Program Files\APC\PowerChute\user_files for Windows systems

/opt/APC/PowerChute/user_files/ for Linux systems

The second file is the .ps1 file. In the example below, we had PowerShell trigger my.exe

Start-Process "C:\Program Files\my.exe"

You will need to verify or change the path to the .exe

The command file runs using the local system account. You may need to change the account to allow the script to run. To change the account, go to Control Panel—Administrative Tools—Services. In the example below, the user has been changed to wkadmin.
PowerChute Services

NOTE: PowerChute cannot execute programs that require interaction with the desktop; only command line-enabled programs are supported, e.g., if you try to launch Notepad, it will fail. In earlier versions of Windows, all services run in Session 0 along with applications. This situation poses a security risk. In Windows Vista and later versions of Windows, the operating system isolates services in Session 0 and runs applications in other sessions. PowerChute is run in Session 0, so if a command file launches a .exe, that .exe will be launched in Session 0 and not visible to the logged-in users. To verify that the .exe has launched, open Task Manager and review the list of Processes running. More information on Windows Session can be foundat http://blogs.technet.com/b/askperf/archive/2007/04/27/application-compatibility-session-0-isolation.aspx

Schneider Electric España

Explorar más
Rango:
Explorar más
Rango:

¿Necesitas ayuda?

  • Empieza aquí

    Encuentra respuestas ahora. Busca una solución por ti mismo, o ponte en contacto con uno de nuestros expertos.

  • Contacta con el servicio de asistencia

    Ponte en contacto con nuestro equipo de atención al cliente para recibir información, soporte técnico, asistencia para reclamaciones y mucho más.

  • ¿Dónde comprar?

    Encuentra fácilmente el distribuidor de Schneider Electric más cercano a tu ubicación.

  • Buscar preguntas frecuentes

    Obtén las respuestas que necesitas examinando las preguntas frecuentes (FAQ) relacionadas con los temas.

  • Contacto con el servicio de ventas

    Comienza tu consulta de ventas on-line y un experto se pondrá en contacto contigo.

Me gustaría recibir noticias e información comercial de Schneider Electric y sus filiales a través de medios de comunicación electrónica, como el correo electrónico, y acepto la recopilación de información sobre la apertura y clics en estos correos electrónicos (mediante el uso de píxeles invisibles en las imágenes) para medir el rendimiento de las comunicaciones y mejorarlas. Para obtener más información, lee la Política de privacidad.

  • Documentación de productos
  • Descargas de software
  • Selector de productos
  • Reemplazo de productos
  • Centro de ayuda y contacto
  • Encuentra nuestras oficinas
  • Pedir presupuesto
  • Dónde comprar
  • Closure of shop.se.com/es/es/ and shop.se.com/pro/es/es/
  • Carreras
  • Perfil corporativo
  • Denunciar una mala conducta
  • Accesibilidad
  • Sala de prensa
  • Inversores
  • EcoStruxure
  • Búsqueda de empleo
  • Blog
  • Política de privacidad
  • Aviso de Cookies
  • Condiciones de uso
  • Cambiar tu configuración de cookies