Jump to content

Powershell From Gse Vbscript


Recommended Posts

I'm trying to use Powershell from a vbscript block.
I'm able to start cmd and use a echo to a file but am unable to start a simple powershell script.


What I'v tried so far:

  • Swyx Service local admin on Swyx server
  • Give the everyone group read and write permission on c:\batchfiles

My non-working Vbscript: 

Dim objShell Set objShell = CreateObject ("WScript.shell")objShell.run "c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File c:\Batchfiles\test-script.ps1" Set objShell = Nothing

The Vbscript which is working:

Dim objShell Set objShell = CreateObject ("WScript.shell")objShell.run "CMD /C echo test >> C:\Users\Public\Downloads\logs\test.txt" Set objShell = Nothing

The Powershell script which I'm trying to run:

$file = "C:\Users\Public\Downloads\logs\test.txt"$date = Get-DateWrite-Host "Appending current date and time ($date) to $file"$date | Out-File $file -Append
Link to comment
Share on other sites

Call routing scripts are run by the SwyxServer. The server runs under the "Swyx Service Account". Make sure, this user has the proper access privileges for the files in question.

Thank you for your reply.


The account used for the Swyx service accounts are the user SwyxServer.

Which is already admin on the swyx server.


Is that what you meant?

Link to comment
Share on other sites

  • 1 year later...

Hello, I have the same issue.

The user with Which I star swyxservice, is SwyxAdmin and it is included in the Administrators Group of the swyx server.

What else should I do to give it admin priviledge to run the powershell script?


Also I have another issue: I have to use the "import-module ippbx" command EVERTIME I open a powershell Windows...if I dont do this it give me error for command not recognized.

I installed powershell module from the SwyxAdministration setp; have I to do something more to make the powershell ippbx module always "ready to use"=?

thank you

Stefano Mattioli

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.