Get-ChildItemコマンドレットの結果をクリップボード経由でワークシートに貼り付けたほうが早いけど、Excel VBAを使用しての方法を考える。 # PowerShell 5.1, Windows 11 (2024年4月頃) $fileInfos = Get-ChildItem -File -Force -Recurse -Depth 1 -LiteralPath "${env:USERPROFILE}\Desktop" $fileInfos.FullName | Sort-Object | Set-Clipboard ' Excel 2019, Windows 11 (2024年4月…