types/psworkitem.types.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was created with Export-PSTypeExtenstion from the
PSTypeExtensionTools module which you can install from
the PowerShell Gallery.
 
Created 12/30/2022 16:04:28
-->
<Types>
  <Type>
    <Name>PSWorkItem</Name>
    <Members>
      <ScriptProperty>
        <Name>OverDue</Name>
        <GetScriptBlock> $this.DueDate -le (Get-Date) </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>TimeRemaining</Name>
        <GetScriptBlock> New-TimeSpan -End $this.DueDate -Start (Get-Date) </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>Age</Name>
        <GetScriptBlock> New-TimeSpan -Start $this.TaskCreated -End (Get-Date) </GetScriptBlock>
      </ScriptProperty>
      <AliasProperty>
        <Name>Due</Name>
        <ReferencedMemberName>DueDate</ReferencedMemberName>
      </AliasProperty>
      <AliasProperty>
        <Name>Deadline</Name>
        <ReferencedMemberName>DueDate</ReferencedMemberName>
      </AliasProperty>
      <PropertySet>
        <Name>ProgressSet</Name>
        <ReferencedProperties>
          <Name>ID</Name>
          <Name>Name</Name>
          <Name>Due</Name>
          <Name>Progress</Name>
          <Name>TimeRemaining</Name>
        </ReferencedProperties>
      </PropertySet>
    </Members>
  </Type>
</Types>