I have a requirement to create a GUI that talks with sharepoint management shell and gives the output then and there.
i tried the solution given here
http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C
but this runs powershell commands and not spcommands. if i give for example get-spsite instead of get-process in the above code it throws me an error like this
Error in script : The term 'Get-spsite' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
i am using sharepoint 2010, .net 4.5, powershell 3.0(this is just FYI)
Any help is much appreciated.