0

这是在 windows powershell cli 下运行良好的 powershell 命令。

Get-ChildItem -Path c:\backup -Recurse | 
     Where-Object {$_.length -gt 1GB} | 
        Sort-Object -Property Length |
            Format-Table  Name,@{name='Size GB';expression={$_.length/1GB}; FormatString='N2'} 

有什么方法可以像使用 WINEXE 一样从 linux 执行这个命令?如何包装它?

winexe -U DC/ID%"PASSWORD" //10.0.0.1 'powershell.exe -command "Get-ChildItem -Path c:\backup -Recurse | Where-Object {$_.length -gt 1GB} |  Sort-Object -Property Length | Format-Table  Name,@{name='Size GB';expression={$_.length/1GB}"'
4

0 回答 0