Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Need help understanding this script.

$
0
0

Hey, i got the following script for my homework in my school and dont understand it. Anything will help. :

$colItems = (Get-ChildItem $strDirectory -recurse | Measure-Object -property length -sum) $size = $colItems.sum / 1MB

if( $size -le $numLimitMB ) { $succ = “SUCCESS: Directory size = ” + $size + ” MB, maximum allowed = ” + $numLimitMB + ” MB DATA:” + $numLimitMB echo $succ } else { $err = “ERROR: Directory size = ” + $size + ” MB maximum allowed = ” + $numLimitMB + ” MB DATA:” + $numLimitMB echo $err }

submitted by /u/aydragon
[link] [comments]

The post Need help understanding this script. appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images