Reputation: 2866
I need to use the SharePoint API in the following way in a PowerShell script:
var service = farm.Services.GetValue<SPWebService>();
How does one specify the generics parameter in PowerShell?
At the moment I get an Exception stating that "Late bound operations cannot be performed on types or methods for which ContainsGenereicParameters is true"
Upvotes: 4
Views: 1292
Reputation: 233150
This is not something you can easily do. You will have to resort to Reflection to make that work. See this blog post for more information.
Upvotes: 7