I want to execute powershell scripts inside my c++ application . Is there any api so that i can use powershell environment in c++ application?
Hi,
There is no public C++ API for VMM. The only public interface is Powershell . You should check out the PowerShell class for C++ http://msdn.microsoft.com/en-us/library/system.management.automation.powershell(VS.85).aspx This class has PowerShell.AddScript method that could execute your VMM script.
Source from: http://social.technet.microsoft.com/Forums/systemcenter/en-US/185ba5af-9c91-44c8-9ed3-bda299581e99/is-it-possible-to-execute-powershell-scripts-executed-from-java-or-c-
And refer the similar thread
http://stackoverflow.com/questions/492953/calling-powershell-scripts-from-unmanaged-c
http://stackoverflow.com/questions/4611415/access-powershell-via-visual-c-api
Hope it can help you