WSLから呼び出す

# powershell 7
pwsh() {
    '/mnt/c/Program Files/PowerShell/7/pwsh.exe' "$@"
}

# powershell 5.1など
pwsh() {
    '/mnt/c/Windows/system32/WindowsPowerShell/v1.0/powershell.exe' "$@"
}

ps -ef

pwsh -Command 'Get-Process | Select-Object Id, ProcessName, @{Name="CommandLine";Expression={(Get-CimInstance Win32_Process -Filter "ProcessId=$($_.Id)").CommandLine}} | Out-String -Width 4096'

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS