Com Object remote

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
zgonzo23
Posts: 1
Last visit: Fri Apr 17, 2009 8:06 am

Com Object remote

Post by zgonzo23 »

I have written a script to use sapi voice command by using a com objectHowever I do not know how to execute so that it will play over the speakers of a remote computer.$a = new-object -comobject sapi.spvoice$a.speak( "warning" )It really does not matter which com-object here just something I am trying to figure out to see if it is possible. This way I can see what options may open up through this route. So the why is not important but the is it possible and how is much more important. Thank you for your help.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Com Object remote

Post by jvierra »

The spaech API does not support remote activation.


It would be cool. I could drive all of my co-workers nuts with this if it did remotely activate.

Each COM object has it's own activations. Some are designed for remoting others aren't. It is on an obect-by-object basis so you have to check with each one to see how.

Also note that PowerShell V1 would not be able to do this easily unless the COM object were build specifically for the threading model of PoSH. Most aren't designed for use with PoSH although many will work correctly.

Again - it's case by case.


jvierra2009-04-17 15:27:52
This topic is 15 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked