How to turn on and off my computer from my iphone?

How can i turn on and off my computer from my iphone, this is the problem I have teamviewer on my computer and my iphone and i can turn off my computer that way, but sometimes i leave my pc turned off and then i can't do the teamviewer, is there any app that will allow me to turn on my computer from my work?

Depends on your settings and what's available to you yes its possible

What app is going to run on a machine that is turned off? Let me explain something. When you turn off a computer it does not run at all, there's no power. So how do you expect the team viewer connection to run from it? Use your brain!

Remotex, wake on lan, app What do you need to Turn On your computer from your iPhone?
A computer connected with an ethernet cable to your network.
A Wireless connection for your iPhone or iPod Touch.
An iPhone or iPod Touch.
A free Wake On Lan application for your iPhone or iPod Touch.
First things first: Wake on Lan
or, how you can turn on computers through the network

That's right. Everything can be accomplished by an Ethernet computer networking standard that allows a computer to be turned on (or woken up) by a network message, that is called Wake-on-LAN, or in short, WoL. Since this is an Ethernet standard, it will ONLY work on your ethernet card (no, it doesn't work on wireless cards attached to your pc).

The support for Wake-on-LAN is implemented on the motherboard of a computer and the network interface. It is not at all dependent on the Operating System you are running.

So, tell me, does your motherboard - network card support WoL? It's a pretty diffused standard, so your computer should very likely support it too.
Enabling Wake on LAN capabilities
To do this, you must enter into the computer BIOS. Usually, you just need to press F1, or F2, or Del keys right after you turn on your pc. If the Operating System starts to load, then you have lost your chance, and need to restart again!

I have an IBM Netvista desktop computer, and for me I had to press F1. Once you are inside, start search for the menu item "Wake on LAN", or anything similar. In my IBM pc, it was under the "Automatic Power On" option.

As you can see from the picture, I just needed to change from Disabled to Automatic for Wake on LAN.

Now, all you need to do before going to your iPhone is to find your computer MAC Address.