我有这么多AD用户数据,150万+,我需要导出他们的属性和powershell正在死亡。 CSVDE不会导出这些属性。救命!!!
ForEach ($fuck in "a*","b*","c*","d*","e*","f*","g*","h*","i*","j*","k*","l*","m*","n*","o*","p*","q*","r*","s*","t*","u*","v*","w*","x*","y*","z*") {Get-ADUser -Filter {(objectClass -eq user) -AND (objectCategory -eq Person) -AND (Name -like $fuck)} -Properties * -SearchBase "DC=whatever,DC=whatever,DC=com" | Export-Csv -path .\group.csv -NoType -append}
答案 0 :(得分:0)
您可以拆分用户群并在迭代中为这些不同的用户群调用脚本。例如。您可以先导出名称从a到i,然后从j到p然后从q到z的用户。您可以尝试在一次迭代中进一步缩小导出的用户范围,并检查是否仍然面临问题。