Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Can we call powershell command from browser extension in Javascript?

I know this is security-wise an absolute No-Go. But my customer is going to use a SAPUI5 developed application in the browser within the intranet upon which my preinstalled browser extension will be invoked (using "matches") which should simply collect the PRINTER names on the local workstation and supplies back to the application which is to be used for further processes. I have the below node js code which return the printernames but how to run this in browser engine.

const { exec } = require('child_process');
exec('get-printer | Select-Object Name | ConvertTo-Json', { 'shell': 'powershell.exe' }, (error, stdout, stderr) => {
console.log(stdout);
}) 
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can't. You will need to expose your nodeJS code as an API which can be called by the browser environment. You could try exposing it as a REST endpoint inside a nodejs express app. Check this example: https://www.geeksforgeeks.org/how-to-connect-node-js-with-react-js/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!