Weird #powershell question for the mastohordes...
»»»» $expiryDate = (Get-Date).AddDays(-3)
»»»» new-item test.txt
»»»» Test-Path -Path 'test.txt' -NewerThan $expiryDate
True
[#] as expected, but
»»»» Test-Path -PathType Leaf -Path 'test.txt' -NewerThan $expiryDate
Test-Path : A parameter cannot be found that matches parameter name 'NewerThan'.
WTF? Why does it forget it has newerThan as soon as you add pathtype?
=> More informations about this toot | View the thread | More toots from furicle@mastodon.social
=> View powershell tag This content has been proxied by September (ba2dc).Proxy Information
text/gemini