|
Ok, I've got a problem. I have a datatable (returned data from an SQL query), and I need to count up the items that have the same of a single element. So there are the following fields: HostName DisplayName EntryDate Usages and I need to count up all the items that have the same displayname. I understand essentially how it would be done (probably easiest would be a dynamic variable with the same name, that just gets incremented), but I'm unfamiliar with how these are actually done in Powershell.
|
# ¿ May 2, 2011 19:55 |
|
|
# ¿ Apr 30, 2024 16:16 |
|
wwb posted:Easiest way would be to have sql server do it actually- "SELECT COUNT(*) as ItemCount, HostName, DisplayName, EntryDate, Usages GROUP BY HostName" is a step in the right direction.
|
# ¿ May 2, 2011 21:38 |
|
adaz posted:Would you want to know blahblah was used twice, foobar three times, and snafu once?
|
# ¿ May 4, 2011 05:37 |
|
How can I get my data back after using format list? I'm using "get-eventlog -computername srv01 -logname system -source print -after $date" and then piping through fl to get just a couple properties, but if I use convertto-csv after that, I just get a bunch of UUID's instead of the textual data. Obviously I'm just being stupid and there's something obvious that I'm overlooking.
|
# ¿ Aug 4, 2011 17:43 |
|
evil_bunnY posted:Also, any program that can create 260+ chars paths needs to die in a fire. HAHA you can look at it, but you can't touch it! See also subst.
|
# ¿ Oct 11, 2011 17:43 |