Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

PowerShell Hilfe

$
0
0

Hallo zusammen,

ich habe ein PS Script wo die Pfade auf lever 2 ausgegeben werden. Nun bräuchte ich noch eine weitere Spalte mir Größe der Spalte in MB. Kann jemand bitte helfen dies zu erweitern? Hab wenig Ahnung von PS. 

$startDir = "C:\Temp\"
function list-dir ($root, $level){
     if ($level -gt 0) {
          dir $root  |Where-Object {$_.psiscontainer} | % { 
	        list-dir -root $_.fullname -level ($level-1)
       	    return $_}
     } 
}

list-dir -root $startDir -level 2|%  {  $_| select-object fullname, size} | export-csv -notypeinformation -delimiter ' ' -path e:\file.csv




Viewing all articles
Browse latest Browse all 2314

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>