문제

I am attempting to create a PowerShell command that finds and exports the owner of each distribution list provided in a CVS.

[PS] C:\WINDOWS\system32>Import-Csv $path_import | ForEach-Object {Get-QADGroup $_.Identity | select ManagedBy,Name | Export-Csv $path_export}

Currently the script will output to the screen the information I am trying to capture but only export the last line.

Any assistance would be appreciated.

도움이 되었습니까?

해결책

try this:

Import-Csv $path_import | ForEach-Object {Get-QADGroup $_.Identity | 
select ManagedBy,Name } | Export-Csv $path_export -notypeinformation
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top