Hi Ambily,
For your question #1, try confirming:
1. Powershell 3.0 is installed; and
2. You are calling the Powershell API with local administrator rights.
I've seen this error before and think it may possibly be related to one or both of the above items.
Does this help?
Regards,
Chris
(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)