You can compile the code and output an assembly or even an load the cs file at run time using the Add-Type
cmdlet, no VS necessary.
I wrote an article that shows how you can do that over at PowerShellMagazine.com.
http://www.powershellmagazine.com/2013/05/13/measuring-powershell-scripts/