I am using a C# library (.NET 4) with the System.Management.Automation DLL file to implement some commands for PowerShell (2.0).
I need to get a value from a command in a PowerShell script.
[Cmdlet(VerbsCommon.Get, "MyCommand")]
public class GetMyCommand : Cmdlet
{
protected override void ProcessRecord()
{
// How do I return a value to PowerShell?
}
}
The way I would like to get a value is something like this:
$value = Get-MyCommand