November 2018
Intermediate to advanced
566 pages
17h 15m
English
We need an XML file. You can either use the New-Item cmdlet to create one, or simply use your favorite text editor. We will use Visual Studio Code for this recipe. Follow these steps to get started:
<?xml version="1.0" encoding="utf-8" ?><Types> <Type> <Name>System.IO.FileInfo</Name> <Members> <AliasProperty> <Name>Modified</Name> <ReferencedMemberName>LastWriteTime</ReferencedMemberName> </AliasProperty> <ScriptProperty> <Name>Age</Name> <GetScriptBlock>[math]::Round(((Get-Date) - $this.LastWriteTime).TotalDays)</GetScriptBlock> </ScriptProperty> <NoteProperty ...
Read now
Unlock full access