I can get all sub-items recursively using this command:
Get-ChildItem -recurse
But is there a way to limit the depth? If I only want to rec
As of powershell 5.0, you can now use the -Depth parameter in Get-ChildItem!
-Depth
Get-ChildItem
You combine it with -Recurse to limit the recursion.
-Recurse
Get-ChildItem -Recurse -Depth 2