Thursday, March 19, 2015

#48 : Speaking Script in Powershell

A script can be written which can talk to you and speak out - "Sir! Your copy job has completed." or something like "Sir! Please press any key to continue!". These all are not a fiction with Powershell and you don't have to write much more lines of code to accomplish. In fact, this is just a one liner!

(new-object -com SAPI.SpVoice).speak("One more Powershell tips")

So, I decided to write a completely talking script which will copy all file from one location to another.






One you run it, you would see Merlin talking ...




Once you run it, you will have more ideas about writing any interactive script which could give messages verbally. I am now thinking to write something which will take commands from microphone!!

No comments:

Post a Comment

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...