Passing named parameter when using invoke command

Dear all,

I can’t seems to wrap my head around this. I have a basic script to find out the file size of a directory but I want to pass FormatNumbers parameter from this script.

 $servers = Get-Content ('servers.txt') $path = 'c:temp' foreach ($server in $servers) { $server $output = Invoke-Command -FilePath .Get-DirStats.ps1 -computername $server -ArgumentList ($path) $output } 

How can I include -formatnumbers in my current script?

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

Leave a Reply