This may be a little early to ask this, but I'm running Windows 10 Technical Preview Build 10122. I'd like to set up Cortana to have custom commands. Here's how she works:

Hey Cortana, <she'll listen and process this command>

Microsoft will process the command and if there isn't anything for it, she'll just search the input on bing. However, I'd like to be able to say something like, just for example

Hey Cortana, I'm going to bed now

And have the input I'm going to bed now trigger run a batch script, a VBScript, a command, or any some sort some of custom response that basically does the following.

C:\> shutdown -s

Is there a way to set up a predefined custom commands for Cortana?

Update:

I created this basic YouTube tutorial and this more advanced one with a corresponding GitHub repo based on talkitbr's excellent and very helpful answer below.

At first his answer was beyond my understanding so I decided to break it down in a bit more detail for future users like myself.