I put together a script to delete files older than "x" for each directory in a root directory. The script works as planned, until it gets to a directory that contains 1.9 million files. I know that's a whole lot of files, and this script will clean them up, but are there limitations to Get-ChildItem, or PowerShell's object count?
If I run the command manually on the directory it sits for hours then returns to the prompt without displaying any paths. If I wait 10 minutes after initiating the command and then press the enter key, the file list starts displaying / scrolling. I don't have / want the ability to do this everytime as we will be running this script on a nightly schedule.
Thanks for any info!