I have some code:
$authTicketRepresentationSource = @"public class AuthorizationTicketRepresentation`
{`
public string TicketId { get; set; }
public string Username { get; set; }
public string ClientIpAddress { get; set; }
public string Owner { get; set; }
public DateTime CreationTime { get; set; }
public DateTime ExpirationTime { get; set; }
public string ResourceId { get; set; }
public int MinutesToLive { get; set; }
}
"@
$authTicketRepresentation = Add-Type -TypeDefinition $authTicketRepresentationSource -Name "AuthorizationTicketRepresentation" -PassThru
But when I call Add-Type as above I get an exception 'Parameter set cannot be resolved using the specified named parameters.'
What am I doing wrong? How can I get this type available to the PowerShell script?
Thank you.
Kevin Burton