I'm trying to use the script service on W2K12. It fails to run multiple
commands. I have run this in the past successfully.

My scriptservice.conf file is as follows:

-address x.x.x.x:8083
-command "test"
-command "tes2"

I get the following in the event logs.

Error executing command ""tes2"":
System.Management.Automation.Runspaces.InvalidRuns paceStateException: Cannot open the runspace because the runspace is not in the BeforeOpen state. Current state of the runspace is 'Closed'.
at System.Management.Automation.Runspaces.RunspaceBas e.CoreOpen(Boolean syncCall)
at Novell.IDM.WSD.ScriptService.SSWindowsService.Serv iceMain(String[] args)

This is actually a result of trying to work around another problem where
i was trying to load the remote exchange cmdlets. There it would run the
script but the cmdlets such as get-mailbox could not be found by my
subscriber.ps1 scripts. I had a script which called the
remoteexchange.ps1 script and connected me to the exchange server. I can
see it is connecting through the logs but the cmdlets are not available
to the scriptservice.

-command . C:\"Program Files"\Novell\WSDriver\scripts\powershell\scriptse rvice.ps1

Any help, much appreciated.

keil0008's Profile: https://forums.netiq.com/member.php?userid=9676
View this thread: https://forums.netiq.com/showthread.php?t=56004