且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Powershell 在过去 6 个月内禁用 AD 用户?

更新时间:2023-11-29 10:25:52

不是使用 Out-GridView 来显示结果,您需要将它们保存到文件中.您可以像这样使用 Export-Csv 以 CSV 格式轻松完成此操作.

Instead of using Out-GridView to display the results, you need to save them to a file. You can do that easily in the CSV format by using Export-Csv like this.

Export-Csv '.DisabledEmployees.csv' -NoTypeInformation

为了清楚起见,只需将管道末尾的 Out-GridView 行替换为这一行.

To be clear, just replace the Out-GridView line at the end of the pipeline with this line.