I like to propose to you, to remove all labels from Types.ps1xml files. You are re-labeling essential properties, which makes it hard to write scripts.
Take the Backup Sessions, for example. It's great that if someone writes an object to the Information Stream, they have the most important values displayed as a formatted table or list.
What is not great is that you also re-label the object's properties in the Types.ps1xml. If someone used to PowerShell sees this ...
Code: Select all
PS C:\> $bs[0]
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
minio-job (Increm... Stopped 11.09.2021 02:00:14 11.09.2021 02:02:45 Success
Code: Select all
$bs[0].StartTime
Some other examples are:
Veeam.Backup.Core.CBackup / Name -> Job Name
Veeam.Backup.Core.CRestoreSession / JobType -> Restore Type
Veeam.Backup.Core.CRestoreSession / JobName-> VM Name
When you compare formatted objects with all cmdlets that are shipped with Windows, you notice that this kind of re-labelling is not standard. Just one example, this ...
Code: Select all
PS C:\> get-item C:
Directory:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d--hs- 13.04.2022 08:15 C:\
Code: Select all
PS C:\> get-item C: | select LastWriteTime