test

直下のみ(まずは -WhatIf で確認)

Get-ChildItem -File | Where-Object { $_.BaseName -match ‘(2)$’ } | Remove-Item

使い方
PS S:\syslog\192.168.8.2> cd S:\syslog\192.168.10.42\2025
PS S:\syslog\192.168.10.42\2025> Get-ChildItem -File | Where-Object { $_.BaseName -match ‘(2)$’ } | Remove-Item