(gci . | ? { $_.PsIsContainer }).Count

Advertisements