我正在获取我需要的信息,尽管在导出信息时出现错误。
当我运行此代码时:
get-process | Export-csv -Path "C:\export.csv" -NoTypeInformation
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Export-csv : Access to the path 'C:\export.csv' is denied.
At line:1 char:14
+ get-process | Export-csv -Path "C:\export.csv" -NoTypeInformation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Run Code Online (Sandbox Code Playgroud)
如何导出为 CSV?