Toot

Written by furicle on 2025-01-16 at 21:35

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

Mentions

Tags

=> View powershell tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113840184848168324
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
243.187624 milliseconds
Gemini-to-HTML Time
0.412112 milliseconds

This content has been proxied by September (ba2dc).