Powershell Hashtable

I'm trying to create a custom hash table using the following code but I'm not getting any output

foreach ($user in $users){
$files = Get-ChildItem -Recurse "\\192.168.1.2\c$\user\$user"
$totalsize = ($files | Measure-Object -Sum Length).sum / 1mb
$totalsize = [decimal]::round($totalsize) 

$output=@{"User"="$user" ; "Size" = "$totalsize"}

Answers


Does this work better?

$Output = 
 foreach ($user in $users){
  $files = Get-ChildItem -Recurse "\\192.168.1.2\c$\user\$user"
  $totalsize = ($files | Measure-Object -Sum Length).sum / 1mb
  $totalsize = [decimal]::round($totalsize)
  @{"User"="$user" ; "Size" = "$totalsize"}
  }

$output

Need Your Help

C# code can't "see" the methods in my C++ dll

c# c++ visual-studio-2010 dll

I have a code written in C++ (that I did not write) and want to use it in C#, so I decided to make a dll and use this class from there.

How to implement a fast, lazy KDTree in Haskell?

haskell lazy-evaluation nearest-neighbor kdtree

I am trying to implement a kdtree in Haskell (see implementation) but I tried to be smart and utilize Haskells lazyness while implementing the nearest neighbour algorithm (see line 46).